• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Divide different type of requests

#4
(05-14-2017, 04:48 AM)mt19 Wrote: In my application I have 13 controllers, then my router would be something like 50 lines long.

It is possible that I am loosing some special functions through.

PS, I love the new routing in CI4, great work!


It doesn't sounds logical a framework to follow some personal needs (in that case yours). 
You can make grouping to your routes and with that to make it more clear or to use resources routes or to extend the router by yourself.

Grouping
https://bcit-ci.github.io/CodeIgniter4/g...ing-routes

Resource routes
https://bcit-ci.github.io/CodeIgniter4/g...rce-routes

Those are helpful features ..

Further if you have some specific logic of your routes in your mind you can follow the "resource" idea and to extend the Router with adding another method as resource() where you can register the group of routes which you have multiple times at your controllers...
Best VPS Hosting : Digital Ocean
Reply


Messages In This Thread
Divide different type of requests - by mt19 - 05-13-2017, 04:43 AM
RE: Divide different type of requests - by mt19 - 05-14-2017, 04:48 AM
RE: Divide different type of requests - by sv3tli0 - 05-15-2017, 03:18 AM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


Users browsing this thread:
1 Guest(s)


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2017 MyBB Group.