P
P
Petr Fronin2021-12-14 10:05:54
symfony
Petr Fronin, 2021-12-14 10:05:54

Symphony how to organize infinite url?

How to organize a route in Symphony 3.4 with infinite nesting
Example
domen.ru/test/test2/test3/test4/
domen.ru/test/test2/test3/
domen.ru/test/test2/test3/test4/test5/

$routes = new RouteCollection();
$routes->add('catalog', new Route(
    '/{page}/',
    [],
    []
));


Something like this
As a result, the page would get the values:
/test/test2/test3/test4/
/test/test2/test3/
/test/test2/test3/test4/test5/

And then it could be resolved in the controller

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question