plugin
plugin copied to clipboard
[Feature Request]: Support new Filament v4 resource structure
Feature Description
Filament introduced a new suggested folder structure for their resources within v4: https://filamentphp.com/docs/4.x/resources/overview#creating-a-resource
Right now the plugin still generates it the old way while Filament v4 is installed.
v3:
- Resources
- OrderResource
- Pages
- ...
- OrderResource.php
- OrderResource
v4:
- Resources
- Orders
- Pages
- ...
- OrderResource.php
- Orders
Hi. Yes, it's on our list. BTW, do you know if this behaviour can be configured somehow? Maybe in the config file?
Hi. Yes, it's on our list. BTW, do you know if this behaviour can be configured somehow? Maybe in the config file?
I just know that you can keep the old structure with feature flags:
- https://github.com/filamentphp/filament/blob/bd50530a3a9f233cf560442b98a243f95ea49efe/packages/support/config/filament.php#L104
- https://filamentphp.com/docs/4.x/upgrade-guide#publishing-the-configuration-file
So this configuration within v4 will generate the resources like in the v3:
'file_generation' => [
'flags' => [
Filament\Support\Commands\FileGenerators\FileGenerationFlag::PANEL_RESOURCE_CLASSES_OUTSIDE_DIRECTORIES
],
],