F
Filamentβ€’2y ago
Ridlafalah

is it possible to make tab filter optional according to role?

im using plugin spatie and has 2 roles, admin and user for each area, i only need tabs filter when i login as admin, thanks. πŸ™πŸ»
2 Replies
Kenneth Sese
Kenneth Seseβ€’2y ago
There’s a few ways to do this, but one would be to add an early return inside getTabs() and return an empty array if it’s not your admin.
Ridlafalah
RidlafalahOPβ€’2y ago
Thanks dude, it works πŸ‘πŸ»

Did you find this page helpful?