get user login id without auth lararvl code example Example: laravel auth user_id $userId = Auth::id();