Clear filament cache when installing a plugin (#2017)

This commit is contained in:
Boy132 2025-12-20 02:00:57 +01:00 committed by GitHub
parent 242a75bf3d
commit 1d5ace3a6d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -7,6 +7,7 @@ use App\Exceptions\Service\InvalidFileUploadException;
use App\Models\Plugin;
use Composer\Autoload\ClassLoader;
use Exception;
use Filament\Facades\Filament;
use Filament\Panel;
use Illuminate\Console\Application as ConsoleApplication;
use Illuminate\Console\Command;
@ -287,6 +288,10 @@ class PluginService
$this->runPluginMigrations($plugin);
$this->runPluginSeeder($plugin);
foreach (Filament::getPanels() as $panel) {
$panel->clearCachedComponents();
}
} catch (Exception $exception) {
$this->handlePluginException($plugin, $exception);
}