roles
roles copied to clipboard
Get role slug
I have a users table with all the users in my DB. I need one of the columns to show the role slug.
How can i get it?
Thanks
I need this too. An answer would be appreciated
Pretty old question, it's open so anyway... I think the only way is using a foreach:
foreach( Auth::user()->roles as $role ) echo $role->slug;
We can change it a little bit to get last, first, or highest role.