Welcome Guest, Not a member yet? Register   Sign In
Codeigniter HMVC to set up custom routes for modules
#2

(03-30-2015, 07:40 PM)mdixon18 Wrote: Is it possible to create custom routes like this in a module?

It is possible - I've done it a few times before and works as expected.  Not sure if you're using CI2 or CI3, I've only used this feature with CI2 so far.

Quick example of routes in ...modules/cn-pto/config/routes.php

Code:
$route['cn-pto'] = 'cn_pto';
$route['cn-pto/events'] = "cn_pto/events";
$route['cn-pto/update'] = "cn_pto/update";
$route['cn-pto/holidays'] = "cn_pto/holidays";
$route['cn-pto/events/(:num)/(:num)'] = "cn_pto/events/$1/$2";
$route['cn-pto/events/(:num)/(:num)/(:any)'] = "cn_pto/events/$1/$2/$3";
Reply


Messages In This Thread
RE: Codeigniter HMVC to set up custom routes for modules - by laynebay - 03-30-2015, 09:10 PM



Theme © iAndrew 2016 - Forum software by © MyBB