From f457affe475dd424e65f30d3cad914b94fb89c1a Mon Sep 17 00:00:00 2001 From: kenjis Date: Wed, 8 Jun 2022 17:12:15 +0900 Subject: [PATCH] fix: spark routes shows "ERROR: 404" By adding the method Home::getTest, the command php spark routes gives the result: ERROR: 404 Cannot access the default controller "Home" with the controller name URI path. --- .../Utilities/Routes/AutoRouterImproved/AutoRouteCollector.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/Commands/Utilities/Routes/AutoRouterImproved/AutoRouteCollector.php b/system/Commands/Utilities/Routes/AutoRouterImproved/AutoRouteCollector.php index 0df2e6bff490..e7597014f899 100644 --- a/system/Commands/Utilities/Routes/AutoRouterImproved/AutoRouteCollector.php +++ b/system/Commands/Utilities/Routes/AutoRouterImproved/AutoRouteCollector.php @@ -65,7 +65,7 @@ public function get(): array foreach ($finder->find() as $class) { // Exclude controllers in Defined Routes. - if (in_array($class, $this->protectedControllers, true)) { + if (in_array('\\' . $class, $this->protectedControllers, true)) { continue; }