芝麻web文件管理V1.00
编辑当前文件:/home/digitalh/panorama.panoramawholesale.com/app/Exceptions/Handler.php
reportable(function (Throwable $e) { // }); $this->renderable(function (NotFoundHttpException $e, $request) { if ($request->is('api/*')) { return $this->notFoundResponse([], __('Page Not Found.')); } }); $this->renderable(function (MethodNotAllowedHttpException $e, $request) { if ($request->is('api/*')) { return $this->methodNotAllowedResponse(); } }); $this->renderable(function (AuthenticationException $exception, $request) { if ($request->is('api/*')) { return $this->unauthorizedResponse(); } }); $this->renderable(function (ValidationException $exception, $request) { if ($request->is('api/*')) { return $this->unprocessableResponse($exception->errors()); } }); $this->renderable(function (HttpException $exception, $request) { if ($request->is('api/*')) { return $this->serviceUnavailableResponse(); } }); $this->renderable(function (\Illuminate\Http\Exceptions\PostTooLargeException $exception, $request) { if (! $request->is('api/*')) { \Session::flash('fail', __('Your file is too large.')); return redirect()->back(); } return $this->unprocessableResponse(); }); $this->renderable(function (\Laravel\Socialite\Two\InvalidStateException $exception, $request) { return redirect()->route('site.index'); }); } }