CakePHP 3.x and 4.x
Is there a way to write dynamic routes in DB ?
I tried to fill a url field with : [‘controller’ => ‘Articles’, ‘action’ => ‘view’, 2]
and then I wrote Router::url($item->url)
(this route is also defined in routes.php)
Best would be to be able to write a full route like :
(’/la-librairie’, [‘controller’ => ‘articles’, ‘action’ => ‘index’, 2])
and then : $routes->connect($item->url)
I tried several combinations but none did work.
The aim is to be able to write dynamic urls easily.
Any idea ?