I am using laravel 5.4, I want to get role from authenticated user So that i am calling auth()->user()->role
in blade template and it always return null
i've add relation to user model, like this:
public function role()
{
return $this->hasMany(UserRole::class, 'user_id');
}
anyone know how to solve it?
via brobrobrobrobro