authenticate user laravel with Auth code example Example 1: laravel auth user_id $userId = Auth::id(); Example 2: authentication in laravel tutorial laravelAuth