Closed
Description
Say I import the following route:
app/config/routing.yml
AcmeBusinessBundle_client:
resource: "@AcmeBusinessBundle/Resources/config/routing/client.yml"
prefix: /clients
...Resources/config/routing/client.yml
acme_business_client_list:
pattern: /
defaults: { _controller: AcmeBusinessBundle:Client:list }
acme_business_client_create:
pattern: create
defaults: { _controller: AcmeBusinessBundle:Client:create }
The route comes through as follows:
php app/console router:debug
acme_business_client_list ANY /clients/
acme_business_client_create ANY /clients/create
Which means there is no way to make the route just /clients for the list page.
This also creates an issue when adding a _format requirement.
Take the following for example:
acme_business_client_list:
pattern: /.{_format}
defaults: { _controller: AcmeBusinessBundle:Client:list }
acme_business_client_create:
pattern: create
defaults: { _controller: AcmeBusinessBundle:Client:create }
Now it comes through as:
php app/console router:debug
acme_business_client_list ANY /clients/.json
acme_business_client_create ANY /clients/create
Is there any kind of work around for this besides importing the list route on its own?