Welcome Guest, Not a member yet? Register   Sign In
Move Routers to Controller?
#1

Hello, is it possible move routers rules ti contoller? ( in CI3)
Reply
#2

What do you have in mind? The router decide which controller to call. How can it work the other way around? The only thing I can think of is a base controller that would do redirects in its constructor.
CodeIgniter 4 tutorials (EN/FR) - https://includebeer.com
/*** NO support in private message - Use the forum! ***/
Reply
#3

I mean put router code in Controller, beacause my routes.php is too big, and easy controll routers in controller
Reply
#4

(11-07-2021, 12:28 PM)motoroller Wrote: beacause my routes.php is too big

Why is it a problem? If you move that code in the controller it will be the same size. I don't get it.

(11-07-2021, 12:28 PM)motoroller Wrote: and easy controll routers in controller

...if it's easy, then do it?  Huh
CodeIgniter 4 tutorials (EN/FR) - https://includebeer.com
/*** NO support in private message - Use the forum! ***/
Reply




Theme © iAndrew 2016 - Forum software by © MyBB