Access handleRecordCreation on resource
I have a create class in one of my resources, within this resource i use the
handleRecordCreation()
However i want to access this method when doing a form action for a resource manager.
This is in the table actions of my tables
Rather than duplicate, or create a laravel action class or similar, is there a desired "filament way" to use the logic from handleRecordCreation()
from within the using()
method on table actions.4 Replies
I usually extract this to an "action class". Not a Filament
Action
, but just a generic class that can perform something :
Could be a plain PHP class or if you want to dig much deeper, I really like this package:
https://github.com/lorisleiva/laravel-actions
GitHub
GitHub - lorisleiva/laravel-actions: β‘οΈ Laravel components that tak...
β‘οΈ Laravel components that take care of one specific task - GitHub - lorisleiva/laravel-actions: β‘οΈ Laravel components that take care of one specific task
or create a laravel action class or similar,Ok, I missed this part of your message But my suggestion still stands π
Okay, this is nice to know though, it kind of means I'm not heading in a wrong direction π
I really appreciate the feedback I guess that's what I'll do π