I'm trying to prefix all routes within single controller with _locale
but so far I haven't had any success:
/**
* @Route("/{_locale}/events", requirements={"_locale": "en"})
* @Route("/{_locale}/evenements", requirements={"_locale": "fr"})
*/
class SomeController extends Controller{
/**
* @Route("/", name="events")
*/
public function indexAction(){
...
}
...
}
route:debug
does not even list URLs prefixed by second @Route
. I tried removing _locale
slug altogether but still, route could not be found.
Am I missing something here? Is it even possible to have multiple prefixes?
Any help would be greatly appreciated...