Hide action table by role

I use spatie shield to set roles for users, I want to hide some actions in the table if the role is not super admin, how do I do that? I have tried this but it doesn't work.
Solution:
Shouldn't it be hasRole('super_admin') ?
Jump to solution
2 Replies
Solution
LeandroFerreira
LeandroFerreira7mo ago
Shouldn't it be hasRole('super_admin') ?
EL REKT
EL REKTOP7mo ago
Wow, thanks @Leandro Ferreira , this works. I'm referring to this, I think hasRole refers to the name of the role we created.
Want results from more Discord servers?
Add your server