use Illuminate\Support\Facades\Auth;//use user_idAuth::loginUsingId(1);// Login and "remember" the given user...Auth::loginUsingId(1, true);$user=User::find($userId);//use Authenticatable userAuth::login($user);// Login and "remember" the given user...Auth::login($user, true);也使用 Auth::guard('notDeafault')->login($user);如果你想切换默认守卫