From cf7ab9dc1ef4e4bc6a21799f01a35f2abc7db769 Mon Sep 17 00:00:00 2001 From: kenjis Date: Sat, 10 Feb 2024 11:03:27 +0900 Subject: [PATCH 1/4] docs: add sample code to get URI segments --- user_guide_src/source/incoming/routing/069.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/user_guide_src/source/incoming/routing/069.php b/user_guide_src/source/incoming/routing/069.php index 991aa5c57b74..24d6366840a3 100644 --- a/user_guide_src/source/incoming/routing/069.php +++ b/user_guide_src/source/incoming/routing/069.php @@ -4,7 +4,10 @@ // Would execute the show404 method of the App\Errors class $routes->set404Override('App\Errors::show404'); -// Will display a custom view +// Will display a custom view. $routes->set404Override(static function () { - echo view('my_errors/not_found.html'); + // If you want to get the URI segments. + $segments = request()->getUri()->getSegments(); + + return view('my_errors/not_found.html'); }); From d7a4ba2daa2079cc540a9fa6240dc7e2bbcf6f50 Mon Sep 17 00:00:00 2001 From: kenjis Date: Tue, 13 Feb 2024 16:00:24 +0900 Subject: [PATCH 2/4] refactor: use official user guide URLs --- app/Views/welcome_message.php | 4 ++-- system/Debug/Toolbar/Views/_config.tpl | 2 +- system/Session/Handlers/BaseHandler.php | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/Views/welcome_message.php b/app/Views/welcome_message.php index 86a6e39de305..38b3c974c0c7 100644 --- a/app/Views/welcome_message.php +++ b/app/Views/welcome_message.php @@ -214,7 +214,7 @@ -