Welcome Guest, Not a member yet? Register   Sign In
How to make and include different routing files inside one route file?
#7

If you just want to include another routes file, just `require` the routes file.
https://www.php.net/manual/en/function.require.php

If you want code modularization, CI4 provides Code Modules:
https://www.codeigniter.com/user_guide/g...dules.html
and a routes file (Module/Config/Routes.php) in a module is automatically discovered by Auto-Discovery
https://www.codeigniter.com/user_guide/g...tml#routes
Reply


Messages In This Thread
RE: How to make and include different routing files inside one route file? - by kenjis - 04-26-2023, 02:34 AM



Theme © iAndrew 2016 - Forum software by © MyBB