© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•3y ago•
6 replies
Oumuamua

How to disable ToggleColumn when user don't have update permission

I have implemented spatie permission package and when the user don't have edit/update permission on any resource the edit button is not visible. However, I have a toggle column in table which updates entries status which is still accessible when user don't have required permission.

Can anyone please help how can I make it disabled when the user don't have edit permission.
Screenshot_2023-11-26_at_5.18.11_PM.png
Solution
use
->disabled(function($record){
  // check for permission
}),
->disabled(function($record){
  // check for permission
}),
Jump to solution
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

ToggleColumn don't update the pivot table
FilamentFFilament / ❓┊help
13mo ago
How to modify ToggleColumn function?
FilamentFFilament / ❓┊help
3y ago
How to stop table refreshing when using a ToggleColumn?
FilamentFFilament / ❓┊help
11mo ago
ToggleColumn
FilamentFFilament / ❓┊help
10mo ago