laravel admin 和 会员member 登录跳转混乱
文件在 App\Exceptions\Handler.php
/** * 登录过期后的跳转地址 * @param \Illuminate\Http\Request $request * @param AuthenticationException $exception * @return \Illuminate\Http\JsonResponse|\Illuminate\Http\RedirectResponse */ protected function unauthenticated($request, AuthenticationException $exception) { $guards = $exception->guards(); return $request->expectsJson() ? response()->json(['message' => $exception->getMessage()], 401) //: redirect()->guest(route('admin.login')); : redirect()->guest( in_array('web', $guards) ? route('admin.login') : route('sign_in') ); }