romanbican / roles

Powerful package for handling roles and permissions in Laravel 5
MIT License
1.15k stars 296 forks source link

get user's role in blade view #168

Open Dito-Orkodashvili opened 8 years ago

Dito-Orkodashvili commented 8 years ago

Hi, I am creating user's table. one column is for the current role of the user. when I do this $user->getRoles(); it gives me json object. I need to display just a slug. How can I do that?

Isfirs commented 8 years ago

if you inserted the trait, it should be something like $user->roles() Check: HasRoleAndPermission