Skip to content

Commit

Permalink
Fix Resource Registration (#140)
Browse files Browse the repository at this point in the history
* fix: page-resource registration

* Fix styling

---------

Co-authored-by: Z3d0X <Z3d0X@users.noreply.github.com>
  • Loading branch information
Z3d0X and Z3d0X authored Feb 19, 2024
1 parent c54541b commit 04319ac
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/FilamentFabricatorPlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand All @@ -27,9 +26,9 @@ 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
Expand Down

0 comments on commit 04319ac

Please sign in to comment.