Table Action
Tables\Actions\EditAction::make()
->button()
->label('Təsdiqlə')
->icon(null)
->successNotificationTitle('Ugurlu')
->after(fn(DateOrder $dateOrder): string => $dateOrder->update(['status' => 1])),
When I go to the edit page, I want the information from the form to be updated and the status change to be 1 as hidden. However, this code works when updating the modal, not the edit page. How can I make it work in the edit page?


1 Reply
protected function handleRecordUpdate(Model $record, array $data): Model
{
$record->update([
'status' => 1
]);
return $record;
}
this function helpful