Auth::user() not working laravel can't get logged in user id code example Example: laravel auth user_id $userId = Auth::id();