mirror of
https://github.com/skipperbent/simple-php-router.git
synced 2026-07-11 22:12:18 +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::get('/not-found', 'PageController@notFound');
|
||||||
|
|
||||||
Router::error(function(Request $request, \Exception $exception) {
|
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');
|
response()->redirect('/not-found');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user