mirror of
https://github.com/skipperbent/simple-php-router.git
synced 2026-06-17 00:37:52 +00:00
@@ -682,7 +682,7 @@ The code should be placed in the file that contains your routes.
|
||||
Router::get('/not-found', 'PageController@notFound');
|
||||
|
||||
Router::error(function(Request $request, \Exception $exception) {
|
||||
if($exception instanceof NotFoundHttpException && $exception->getCode == 404) {
|
||||
if($exception instanceof NotFoundHttpException && $exception->getCode() == 404) {
|
||||
response()->redirect('/not-found');
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user