modal with mutateData
Hello, in filament I delete the getPages create part and open the forms modally, but how can I use mutateFormDataBeforeCreate here?
11 Replies
but dont have action
@jaocero
using Resource
@cenksen I didn't tried it yet but you can go to your list collection you can see the
Actions\CreateAction::make()
there or go to your create collection resource then you can modify the saving of data using:
again I din't try it yet@cenglyy
buyrun:)
Sana yazmış beni etiketlemis 🙂
😄
İyi çalışmalar dostum 🙂
teşekkürler size de:)
Fixed, thank you 🙂
protected function getHeaderActions(): array
{
return [
Actions\CreateAction::make()->mutateFormDataUsing(function (array $data): array {
$data['operator_id'] = auth()->id();
return $data;
})
];
}
Yes, this worked but when saving the data, this time it does not save it to the database
@jaocero