Simple (modal) resource and mutateFormDataBeforeSave()
I have a problem with my simple resource.
I need to mutate the data before saving, but it's not possible to use mutateFormDataBeforeSave() as I would do with normal resource.
Any ideas?
I would like to add the following code:
I could use the boot() method on the model, but I would prefer not to do that.
Thank you
ZioLupo
I need to mutate the data before saving, but it's not possible to use mutateFormDataBeforeSave() as I would do with normal resource.
Any ideas?
I would like to add the following code:
I could use the boot() method on the model, but I would prefer not to do that.
Thank you
ZioLupo
Solution
Try adding
https://filamentphp.com/docs/3.x/actions/prebuilt-actions/edit#customizing-the-saving-process
->using() to the Filament\Tables\Actions\EditAction https://filamentphp.com/docs/3.x/actions/prebuilt-actions/edit#customizing-the-saving-process