get auth user id in laravel blade code example
Example 1: get id user login laravel
use Auth;
$user_id = Auth::user()->id;
Example 2: is users logged in laravel blade
@auth
// user logged in
@else
// not logged in
@endauth
use Auth;
$user_id = Auth::user()->id;
@auth
// user logged in
@else
// not logged in
@endauth