php - Group and nest routes in Symfony 3
I currently work on a Symfony Project with a large number of namespaces and Bundles. Many of them share the same base route like so:
# /app/config/routing.yml something: resource: "@SomethingBundle/Controller/" prefix: /admin/something type: annotation
Now, at least 10 other bundles use the
/admin prefix as well, so I was wondering if there would be a way to group and nest them? I imagine something like this (pseudocode):
admin: prefix: /admin nested_resources: - something: resource: "@SomethingBundle/Controller/" prefix: /something type: annotation ...