Skip to content

Commit

Permalink
Fix custom Resource not being considered on Pages (#37)
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasgiovanny authored Feb 14, 2023
1 parent 6184a7e commit 256538b
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/Resources/PageResource/Pages/CreatePage.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,9 @@
class CreatePage extends CreateRecord
{
protected static string $resource = PageResource::class;

public static function getResource(): string
{
return config('filament-fabricator.page-resource') ?? static::$resource;
}
}
5 changes: 5 additions & 0 deletions src/Resources/PageResource/Pages/EditPage.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@ class EditPage extends EditRecord
{
protected static string $resource = PageResource::class;

public static function getResource(): string
{
return config('filament-fabricator.page-resource') ?? static::$resource;
}

protected function getActions(): array
{
return [
Expand Down
5 changes: 5 additions & 0 deletions src/Resources/PageResource/Pages/ListPages.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@ class ListPages extends ListRecords
{
protected static string $resource = PageResource::class;

public static function getResource(): string
{
return config('filament-fabricator.page-resource') ?? static::$resource;
}

protected function getActions(): array
{
return [
Expand Down
5 changes: 5 additions & 0 deletions src/Resources/PageResource/Pages/ViewPage.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@ class ViewPage extends ViewRecord
{
protected static string $resource = PageResource::class;

public static function getResource(): string
{
return config('filament-fabricator.page-resource') ?? static::$resource;
}

protected function getActions(): array
{
return [
Expand Down

0 comments on commit 256538b

Please sign in to comment.