attempt($request->only(['email', 'password'])); Event::dispatch(new Login($request, $token)); if (! $token) { throw new FailedException('登录失败!请检查邮箱或者密码'); } return compact('token'); } /** * logout * * @return bool */ public function logout() { // Auth::guard(Helper::getGuardName())->logout(); return true; } }