@php if(Auth::check()){ $user = Auth::user(); $user_id = $user->id; $role_user = AppModelsRoleUser::where('user_id', $user_id)->first(); $role_name = AppModelsRole::where('id', $role_user->role_id)->first(); $role = $role_name->name; } @endphp