laravel.com guard code example Example: get id user login laravel use Auth; $user_id = Auth::user()->id;