F
Filament5mo ago
MZX

Can I add a custom action to the create button?

When the user clicks create record, I want it to call a method to generate an invoice. Or will I have to make another button for the action.
Solution:
I think a job or model observer would be better than adjusting the default create action.
Jump to solution
4 Replies
Solution
awcodes
awcodes5mo ago
I think a job or model observer would be better than adjusting the default create action.
MZX
MZXOP5mo ago
What would you recommend?
awcodes
awcodes5mo ago
One’s just as good as the other. The main difference is the job can be queued so it won’t hold up the process. This is relevant if the invoice creation could take some time to complete or if it also needs to be emailed to the user. Don’t want that holding up the page reload.
Dennis Koch
Dennis Koch5mo ago
An observer that queues an job 😉
Want results from more Discord servers?
Add your server