something weird with route config - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: CodeIgniter 4 (https://forum.codeigniter.com/forumdisplay.php?fid=28) +--- Forum: CodeIgniter 4 Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=31) +--- Thread: something weird with route config (/showthread.php?tid=71295) |
something weird with route config - anthos1984 - 07-29-2018 First: Here how i check the router: System/Router/Router.php function: handle(string $uri = null) PHP Code: if ($this->checkRoutes($uri)) This happens when I edit App/Config/Routes.php, When I have: PHP Code: $routes->add('/(:segment)', '\App\Controllers\Vendors\$1::index'); PHP Code: \App\Controllers\Vendors$1 But When im using: PHP Code: $routes->add('/(:segment)', '\App\Controllers\Vendors\V$1::index'); The result is: (http://localhost/samsung) PHP Code: \App\Controllers\Vendors\Vsamsung Not what I expect, but this trick is working for me. Although vendor controller need using prefix |