Symfony2: Splitting routing.yml in multiple files
symfony
Solution
The routing.yml can split by multiple files. You can include separate routing files in your routing.yml file.
acme_demo_user:
resource: "@acmeDemoBundle/Resources/config/routing/user_routing.yml"
prefix: /user
acme_demo_vehicles:
resource: "@acmeDemoBundle/Resources/config/routing/vehicles_routing.yml"
prefix: /vehicles
.............
.............
Problem
I have a routing.yml file where I define the routes of my bundle. My routing file is growing bigger. Is there a way to split the routing.yml file in multiple files? Eg: - user_routing.yml - vehicles_routing.yml - cost_centers_routing.yml NOTE: I am using Symfony 2.2;