How can I save data in custom modal?
I send my own record data here, I made changes, for example, how do I save them?
6 Replies
https://filamentphp.com/docs/3.x/actions/modals#modal-forms
you can add your business logic to the ->action() as a callback closure
->action(function (array $data, Post $record): void {
$record->author()->associate($data['authorId']);
$record->save();
}) I added it this way, but when I pressed send from the inputs I added, no data came out.
Maybe something wrong in your blade file. Why don't you just add the form schema to the modal action?
I cannot use Repeater because the data is not coming in and I need to make a different design because it does not provide the freedom I want.
Is it fillable in your model?