Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix custom PageResource not being considered on Pages #37

Merged
merged 1 commit into from
Feb 14, 2023

Conversation

lucasgiovanny
Copy link
Contributor

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
Copy link
Owner

Z3d0X commented Feb 14, 2023

Thanks

@Z3d0X Z3d0X merged commit 256538b into Z3d0X:main Feb 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants