get login user id laravel code example Example 1: laravel auth user_id $userId = Auth::id(); Example 2: how to find the name of login user in laravel Auth::user()->name