Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- {{ Auth::user()->role_id }}
- {{ Auth::user()->role['name'] }}
- {{ Auth::user()->role->name }}
- User model:
- public function roles()
- {
- return $this->hasOne('AppRole');
- }
- Role model:
- public function roles()
- {
- return $this->belongsToMany('AppUser');
- }
Add Comment
Please, Sign In to add comment