access auth user in laravel mode code example Example 1: laravel auth user_id $userId = Auth::id(); Example 2: Auth log out laravel Auth::logout();