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();
                }
            });
        });
Was this page helpful?