Welcome Guest, Not a member yet? Register   Sign In
Divide different type of requests
#3

(05-13-2017, 08:18 AM)ciadmin Wrote: Sounds a lot like https://bcit-ci.github.io/CodeIgniter4/g...-in-routes

Yeah, sort of. The difference is that with routing, a developer should add each page.

If a site has 2 pages, like 'main' and 'contact', he should do something like:

PHP Code:
$routes->get('main/(:any)''GET_main/$1');
$routes->post('main/(:any)''POST_main/$1');
$routes->put('main/(:any)''PUT_main/$1');
... 

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!
Reply


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



Theme © iAndrew 2016 - Forum software by © MyBB