user()) { throw new AuthenticationException(); } return $next($request); } catch (Exception|Throwable $e) { return response()->json(['code' => 2000, 'message' => '请重新登录!']); } } }