![]() |
I don't know how to work with CI anymore - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: CodeIgniter 4 (https://forum.codeigniter.com/forumdisplay.php?fid=28) +--- Forum: CodeIgniter 4 Support (https://forum.codeigniter.com/forumdisplay.php?fid=30) +--- Thread: I don't know how to work with CI anymore (/showthread.php?tid=85863) |
I don't know how to work with CI anymore - bjbernal - 12-14-2022 Hi! I spent a long time on version 4.1.4, and with this new 4.2.10, I unlearned how to work with codeigniter. I learned that there was a change in routing, and even changing "public bool $autoRoutesImproved" to true in Feature.php and enabling "$routes->setAutoRoute(true);" in Routes.php, it is not working as in version 4.1.4 where I could easily access any method of a controller like "/Controller/method/param". In previous versions, I created a method in the installation's default "Home" controller and could access it with "/Home/mymethod" without configuring anything, now even with the changes suggested in Feature.php and Routes.php it's not working. RE: I don't know how to work with CI anymore - kenjis - 12-18-2022 If you want legacy auto routing, set "public bool $autoRoutesImproved" to false, and "$routes->setAutoRoute(true);". But remember, the Auto Routing (Legacy) is very dangerous. It is easy to create vulnerable apps where controller filters or CSRF protection are bypassed. RE: I don't know how to work with CI anymore - kenjis - 12-18-2022 If you want to use Auto Routing (Improved) and you know Auto Routing (Legacy) (=CI3's auto routing) well, see https://codeigniter4.github.io/CodeIgniter4/changelogs/v4.2.0.html#new-improved-auto-routing |