saeid 2 years ago
parent b8a3cf99aa
commit b2ff2ce4ce

@ -61,7 +61,7 @@ class Handler extends ExceptionHandler
} elseif ($exception instanceof HasRelationException) { } elseif ($exception instanceof HasRelationException) {
return response()->json(Responser::error([$exception->getMessage()]), 422); return response()->json(Responser::error([$exception->getMessage()]), 422);
} elseif ($this->isHttpException($exception)) { } elseif ($this->isHttpException($exception)) {
if ($exception->getStatusCode() == 404) { if ($exception->getStatusCode() == 404 and in_array("web",$request->route()->middleware())) {
return response()->view('webBuilder::errors.404', [], 404); return response()->view('webBuilder::errors.404', [], 404);
} }
} }

Loading…
Cancel
Save