Table Delete Action global configuration not working

I tried to configure the delete action from the service provider boot method in but it won't work.
DeleteAction::configureUsing(function (DeleteAction $deleteAction) {
return $deleteAction->action(function ($record) {
try {
$record->delete();
Notification::make()
->success()
->title('Record deleted successfully!')
->send();
} catch (\Exception $e) {
Notification::make()
->danger()
->title($e->getMessage())
->duration(5000)
->send();
}
});
});
DeleteAction::configureUsing(function (DeleteAction $deleteAction) {
return $deleteAction->action(function ($record) {
try {
$record->delete();
Notification::make()
->success()
->title('Record deleted successfully!')
->send();
} catch (\Exception $e) {
Notification::make()
->danger()
->title($e->getMessage())
->duration(5000)
->send();
}
});
});
0 Replies
No replies yetBe the first to reply to this messageJoin