Welcome Guest, Not a member yet? Register   Sign In
Do I need to set all my routes in Routes.php?
#1

(This post was last modified: 08-10-2019, 12:59 AM by tgix. Edit Reason: typo )

Struggling along trying to recreate my REST API from CI3 in CI4-beta4. I find it very cumbersome to configure all my route entries in Routes.php like this (far from complete):
PHP Code:
$routes->group('users', function ($routes) {
    
$routes->get('list''Users::list');
    
$routes->get('(:num)''Users::get_user/$i');
    
$routes->options('(:any)''Users::options_respond');
}); 
Is there a way to have the routes live in the Controller instead or am I overthinking this?
Reply


Messages In This Thread
Do I need to set all my routes in Routes.php? - by tgix - 08-10-2019, 12:58 AM



Theme © iAndrew 2016 - Forum software by © MyBB