Welcome Guest, Not a member yet? Register   Sign In
Should codeigniter have a group routes like laravel
#3

Yes it have, You can see example here.

Routes can be grouped together under a common prefix, reducing the amount of typing needed and helping to organize the routes.

$routes->group('admin', function($routes) {
$routes->add('users', 'Admin\Users::index');
$routes->add('blog', 'Admin\Blog::index');
});

These routes would be available under an 'admin' segment in the URI, such as:


test.com/admin/users
test.com/admin/blog
AmarInfotech is a PHP Development Company that offers a variety of frameworks like Zend, CakePHP, CodeIgniter to the global clients.
Reply


Messages In This Thread
RE: Should codeigniter have a group routes like laravel - by AmarInfotech - 08-13-2016, 05:40 AM



Theme © iAndrew 2016 - Forum software by © MyBB