Resource/Page stubs removed in Filament v4 – best practice for custom commands?
I’ve noticed that in Filament v4, many of the stubs that existed in v3 are no longer published. For example, in v3 we had:
*
Resource.stub
* ResourcePage.stub
* ResourceEditPage.stub
* ResourceListPage.stub
* RelationManager.stub
* Cluster.stub
* and several others related to resources, forms, tables, etc.
But in v4, only view-related stubs remain, such as:
* PageView.stub
* ThemeCss.stub
* FieldView.stub
* ColumnView.stub
* WidgetView.stub
* etc.
This makes me wonder:
1. Has Filament v4 fully migrated to class generators for resources, pages, and relation managers (instead of relying on stub templates)?
2. What was the reasoning for removing those resource/page stubs in v4? Was it mainly to reduce maintenance or because the new generator architecture is more flexible?
3. If I want to create my own custom php artisan make:*
commands with custom stubs (e.g., injecting methods like handleRecordCreation()
that call a custom Action class), what’s the recommended best practice so I don’t interfere with the core Filament commands?
Basically, I’d like to extend Filament’s generator functionality while still staying upgrade-safe and letting the core team maintain the default stubs.
Thanks in advance for clarifying!1 Reply
The new generator architecture is more flexible while keeping it maintainable. There are multiple steps in the creation wizard and this way we can control how easier how the created resource file will look like