Z3d0X / filament-fabricator

Block-Based Page Builder Skeleton for your Filament Apps
https://filamentphp.com/plugins/fabricator
MIT License
252 stars 48 forks source link

Fix custom PageResource not being considered on Pages #37

Closed lucasgiovanny closed 1 year ago

lucasgiovanny commented 1 year ago

Currently, if you define a custom Resource on filament-fabricator.php, this resource is not considered on the plugin Create, Edit, List, and View pages.

'page-resource' => \App\Models\PageResource::class,

This PR fixes this matter, adding the method below on every page:

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

Thanks