diff --git a/app/ExceptionHandler.php b/app/ExceptionHandler.php index 25cce4e..08558f7 100644 --- a/app/ExceptionHandler.php +++ b/app/ExceptionHandler.php @@ -20,10 +20,6 @@ class ExceptionHandler extends Handler if ($exception instanceof Dumper) { return \response(self::convertToHtml($exception)); } - // json请求返回json数据 - if ($request->expectsJson()) { - return json(['code' => $exception->getCode() ?: 500, 'msg' => $exception->getMessage(), 'show' => 1]); - } // 非json请求则返回一个页面 return new Response(200, [], $exception->getMessage()); }