From e663bf91262f7d627b4835b5c6a709bc5cd0b1b1 Mon Sep 17 00:00:00 2001 From: saeid Date: Sat, 9 Apr 2022 18:08:17 +0430 Subject: [PATCH] feat: add custom page for error 404 --- app/Exceptions/Handler.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/Exceptions/Handler.php b/app/Exceptions/Handler.php index 7323ea7..ee4413b 100644 --- a/app/Exceptions/Handler.php +++ b/app/Exceptions/Handler.php @@ -60,6 +60,10 @@ class Handler extends ExceptionHandler return response()->view('webBuilder::errors.template_disabled', ['error' => 'business banned']); } elseif ($exception instanceof HasRelationException) { return response()->json(Responser::error([$exception->getMessage()]), 422); + } elseif ($this->isHttpException($exception)) { + if ($exception->getStatusCode() == 404) { + return response()->view('webBuilder::errors.404', [], 404); + } } return parent::render($request, $exception);