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.
2 Replies
Solution
Shouldn't it be
hasRole('super_admin')
?Wow, thanks @Leandro Ferreira , this works. I'm referring to this, I think hasRole refers to the name of the role we created.