[eluser]Unknown[/eluser]
I have a question about how to set up my routing for an application i am building.
I have a few normal controllers which work:
Now i want to make a somewhat nested structure in my application
Code:
/brand
/brand/project
/brand/project/folder
each of these steps should have its own controller where certain methodes can be called like:
Code:
/brand/project/add (load project controller)
/brand/project/edit/12 (load project controller)
/brand/project/folder/delete/56 (load folder controller)
However i have no idea how to make this work with the routes.php function.
I tried this, however this was for the following url structure
Code:
/brands/1/projects/1375/folders
Code:
$route['brands/(:num)/projects/(:num)/folders'] = "folders";
$route['brands/(:num)/projects/(:num)'] = "folders";
$route['brands/(:num)/projects'] = "projects";
$route['brands/(:num)'] = "projects";
$route['brands'] = "brands";
But i couldnt call for example an add function in the projects controller.
Can anyone give me a kick in the right direction?