Reputation: 165
I'm trying to have a directory src/Vendor/Bundle/Resources/config/routes/
be full of routing files (in yml). I have this:
# /src/Vendor/Bundle/Resources/config/routing.yml
route1:
resource: "@VendorBundle/Resources/config/routes/"
But the routes don't get picked up and are not listed when I run the router debug in the console.
They do work when I reference them one by one:
# /src/Vendor/Bundle/Resources/config/routing.yml
route1:
resource: "@VendorBundle/Resources/config/routes/myroute.yml"
The docs state this should work but I can't get it to.
So far:
@VendorBundle/Resources/config/routes/*
but that gives me an error (and it's not what's in the docs)Any ideas or advice would be very helpful.
Upvotes: 1
Views: 71
Reputation: 165
Cerad answered the question:
The link is perhaps not as clear as it should be but the directory approach is for route annotations defined inside of controllers. You will need to include your route files one at a time.
Upvotes: 1