Can we use $router->getRoutes("*") |
can we use $router->getRoutes("*") to get all defined routes instead of $router->getRoutes()
because I notices that if we run $router->getRoutes() while we are in POST it will only return the post routes only not all routes. and also I notices that using PHP Code: $router = Services::routes(); will return nothing (array size of 0); I see the default value in codeigniter4/framework/system/Router/RouteCollection.php line 190-195 like this: PHP Code: /** (10-15-2023, 06:24 PM)kenjis Wrote:(10-15-2023, 07:39 AM)mshannaq Wrote: can we use $router->getRoutes("*") to get all defined routes instead of $router->getRoutes() I am planning to store string on database , and I want to make sure that string is nod already one of defined routes before storing it into the database. see this function https://github.com/Extendy/SmartyURL/blo...hp#L42-L60
See system/Router/DefinedRouteCollector.php.
It is the class for the `spark routes` command. |
Welcome Guest, Not a member yet? Register Sign In |