I have DB table defined with four columns: short, controller, action, id
And using this columns I want to create routes dynamically. For example:
http://mywebsite.com/short should point to the page represented normally by address http://mywebsite.com/controller/action/id
Is it possible to make something like this?
A simple google search reveals this.
In
routes.php, you can init a model object$routeModel = ClassRegistry::init('Route'), query$routeModel->find('all')and loop over the results callingRouter::connectfor each row.