How can I get the record created from a createOptionAction?
I'm trying to get the record created inside after(), but this record is null. What would be the correct way to obtain this record?
->createOptionAction(function (Action $action) {
return $action
->modalHeading('Create new user')
->modalSubmitActionLabel('Create')
->modalWidth('lg')
->mutateFormDataUsing(function (array $data): array {
$data['password'] = $data['document'];
return $data;
})
->after(function ($record) {
dd($record); // returning null
});
})