© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•2y ago•
7 replies
Croco

Model Policy on page not working

I followed this https://filamentphp.com/docs/3.x/tables/adding-a-table-to-a-livewire-component#adding-the-table to create a table inside a page. Even if I remove the header buttons:
->bulkActions([
Tables\Actions\BulkActionGroup::make([
Tables\Actions\DeleteBulkAction::make(),
]),
]); it should probably just hide the button, anyway in my case i need to show the checkboxes, so I keep the buttons for now. What i would like you to help me is apply my policy on this table. i have this:
protected $policies = [
Order::class => OrderPolicy::class,
];
on OrderPolicy.php:
public function delete(User $user, Order $model): bool
{ logger("delete");
return $user->can('SuperAdmin');
}
but this method is never called when record is deleted.
Adding a table to a Livewire component - Table Builder - Filament
Filament banner
FilamentJoin
A powerful open source UI framework for Laravel • Build and ship admin panels & apps fast with Livewire
20,307Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Delete method inside model policy not working after editing
FilamentFFilament / ❓┊help
6mo ago
Custom page model binding updated not working
FilamentFFilament / ❓┊help
3y ago
Translations plugin model not accepting Policy
FilamentFFilament / ❓┊help
3y ago
Page Policy permission
FilamentFFilament / ❓┊help
3y ago