From 1d5ace3a6dcf565db7e1de5612980155a8b0be1b Mon Sep 17 00:00:00 2001 From: Boy132 Date: Sat, 20 Dec 2025 02:00:57 +0100 Subject: [PATCH] Clear filament cache when installing a plugin (#2017) --- app/Services/Helpers/PluginService.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/Services/Helpers/PluginService.php b/app/Services/Helpers/PluginService.php index aff5ac6a9..3a496e6ae 100644 --- a/app/Services/Helpers/PluginService.php +++ b/app/Services/Helpers/PluginService.php @@ -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); }