F
Filamentβ€’15mo ago
UmbraMilites

Is it possible to run jobs after a form is submitted?

I have been trying to run a job that alters a different table in the same database after the form is submitted. Is there an efficient way to solve that problem?
4 Replies
hdaklue
hdaklueβ€’15mo ago
you can add this method in the create page protected function handleRecordCreation(array $data) { // Your creation logic using $data } if you're using a livewire component you can schedule the jo directly from the submit() function
UmbraMilites
UmbraMilitesOPβ€’15mo ago
Is there also a function for the edit page?
hdaklue
hdaklueβ€’15mo ago
protected function handleRecordUpdate(Model $record, array $data) : Model{ }
UmbraMilites
UmbraMilitesOPβ€’15mo ago
Thank you for your quick response. I will try that πŸ™‚
Want results from more Discord servers?
Add your server