Dynamic routing (again)

CakePHP 3.x and 4.x
Is there a way to write dynamic routes in DB ?

Example :
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 ?

I guess you can find some usefull toos in GitHub - dereuromark/cakephp-tools: A CakePHP Tools plugin containing lots of useful helpers, behaviors, components, shells, ...

Thank you.
I’ll have a look at this.