Add customized 404 page

This commit is contained in:
DariusIII
2017-08-10 13:44:06 +02:00
parent 66f1e54971
commit 7789c08515
4 changed files with 54 additions and 18 deletions
+6
View File
@@ -6,6 +6,7 @@ use Exception;
use Illuminate\Auth\AuthenticationException;
use Illuminate\Database\Eloquent\ModelNotFoundException;
use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
class Handler extends ExceptionHandler
{
@@ -50,6 +51,11 @@ class Handler extends ExceptionHandler
return response()->view('errors.404', [], 404);
}
if ($exception instanceof NotFoundHttpException)
{
return response()->view('errors.404', [], 404);
}
if ($this->isHttpException($exception)) {
return $this->renderHttpException($exception);
}