P
P
pqgg7nwkd42018-12-11 17:05:34
symfony
pqgg7nwkd4, 2018-12-11 17:05:34

How to specify a path with all possible subdirectories in routing?

Tried like this:

bgg:
    path:     /foo/{any}
    defaults: { _controller: MyBundle:Default:bgg }
    methods:  [GET, POST]

Works for /foo/bar, but does not work for /foo/bar/far.
How can I specify a route so that the controller receives all requests whose uri starts with /foo/ ?

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