Получить зарегистрированный идентификатор пользователя Laravel
$id = Auth::user()->id;print_r($id);
Proud Pigeon
$id = Auth::user()->id;print_r($id);
$user = auth()->user(); print($user->id);print($user->name);print($user->email);
$user = Auth::user();
echo $user->id;
echo $user->name;
echo $user->email;
User Model
public function userDetail()
{
return $this->firstName . $this->lastName . $this->address .$this->phoneNumber;
}
Blade file
@foreach($users as $user)
<h4>User Name {{$user->ame}}</h4>
<p>User Details</p>
{{$user->userDetail()}}
@endforeach