From 34fb524a5163d5794436a478a6937b9445ce59ca Mon Sep 17 00:00:00 2001 From: ZedoX Date: Mon, 19 Feb 2024 19:45:50 +0500 Subject: [PATCH] fix: page-resource registration --- src/FilamentFabricatorPlugin.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/FilamentFabricatorPlugin.php b/src/FilamentFabricatorPlugin.php index 77883aa..28818fd 100644 --- a/src/FilamentFabricatorPlugin.php +++ b/src/FilamentFabricatorPlugin.php @@ -7,7 +7,6 @@ use Filament\Panel; use Pboivin\FilamentPeek\FilamentPeekPlugin; use Z3d0X\FilamentFabricator\Enums\BlockPickerStyle; -use Z3d0X\FilamentFabricator\Resources\PageResource; class FilamentFabricatorPlugin implements Plugin { @@ -27,9 +26,10 @@ public function getId(): string public function register(Panel $panel): void { - $panel->resources([ - config('filament-fabricator.page-resource') ?? PageResource::class, - ]); + $panel->resources(array_filter([ + config('filament-fabricator.page-resource'), + ])); + if (! $panel->hasPlugin(FilamentPeekPlugin::ID)) { //Automatically register FilamentPeekPlugin if it is not already registered