From e04c519ab97a92d712ea55aab763ca9c7e4e01b4 Mon Sep 17 00:00:00 2001 From: Charles T Date: Mon, 2 Oct 2023 15:57:05 +0800 Subject: [PATCH] Update (exception handler): force all dead routes to home page --- app/Exceptions/Handler.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/Exceptions/Handler.php b/app/Exceptions/Handler.php index a6ed5fa..6529a08 100644 --- a/app/Exceptions/Handler.php +++ b/app/Exceptions/Handler.php @@ -38,6 +38,10 @@ public function register() 'status' => -1, ], 404); } + else + { + return redirect()->route('home', [], 301); + } }); }