I'm using entrust for my roles and permissions on laravel 5.2 and I have this on my controller:
$user = Auth::user();
$rol = $user->roles;
dd($rol);
in my User model:
public function roles(){
return $this->belongsToMany('Nini\Role','role_user');
}
And get this: Snapshot
I'm tryng to acces and show "display_name" on my view and i can't, help! Thanks in advance.
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire