$id = Auth::user()->id;print_r($id);
$user = Auth::user();
echo $user->id;
echo $user->name;
echo $user->email;
$user = auth()->user(); print($user->id);print($user->name);print($user->email);
@auth
// user logged in
@else
// not logged in
@endauth
@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