From b2ff2ce4ce5060f28c680a28036f7904baaf1d07 Mon Sep 17 00:00:00 2001 From: saeid Date: Sat, 23 Jul 2022 13:41:12 +0430 Subject: [PATCH] fix --- app/Exceptions/Handler.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Exceptions/Handler.php b/app/Exceptions/Handler.php index ee4413b..b614487 100644 --- a/app/Exceptions/Handler.php +++ b/app/Exceptions/Handler.php @@ -61,7 +61,7 @@ class Handler extends ExceptionHandler } elseif ($exception instanceof HasRelationException) { return response()->json(Responser::error([$exception->getMessage()]), 422); } 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); } }