Hi all,
does anyone have an idea how to get this working?
I have a normal controller called "api" in my controller folder. It has one single action (index) just to present some api information. Now, I'd like to have a subfolder (api_controller) which holds several controller of type Rest which should respond with JSON format. My routes are like this
My goal is when accessing "http://domain.tld/api" it only shows the api information and e.g. accessing "http://domain.tld/api/test/list.json" then being routed to the action "list" of the controller "test" in the subfolder "api_controller". Is that possible?
Thanks for your help!
Regards,
Bastian
I've figured it out... I renamed the subdirectory to "apicontroller", set the controller name like that:
class Controller_Apicontroller_Test extends Controller_Rest { }
and set the route tp
'api/(:any) => 'apicontroller/$1'
and now everything works.