laravel auth user from id code example Example 1: laravel auth user_id $userId = Auth::id(); Example 2: make auth in laravel 7 composer require laravel/ui "^2.0"