Using routing and single pages with a package
Permalink
I created a package containing several single pages and it works well.
I now wish to provide some endpoints for ajax calls which use the DELETE and PUT HTTP methods. It appears that the single pages do not support these methods, so I looked into using the router and it works great when using closure. Instead of closure, however, I wish to use a separate controller class.
Where should this controller be located when installed using a package? Does it have to be in the package's src folder or can I use the single page's controller? I've tried about a million variations, and now do not know which way is up.
Thanks
I now wish to provide some endpoints for ajax calls which use the DELETE and PUT HTTP methods. It appears that the single pages do not support these methods, so I looked into using the router and it works great when using closure. Instead of closure, however, I wish to use a separate controller class.
Where should this controller be located when installed using a package? Does it have to be in the package's src folder or can I use the single page's controller? I've tried about a million variations, and now do not know which way is up.
Thanks