symfony2 - Dynamic action for route in Symfony 2.x (part of the url) -
symfony2 - Dynamic action for route in Symfony 2.x (part of the url) -
is possible define route in symfony 2.x dynamically resolves action based on part of route ?
example :
rest_localite: path: /rest/localite/{_action} defaults: { _controller: applicationlocalitebundle:rest:{_action}, _format: json }
thank much
this considered bad practice exposes internal parts of application , lastly heard removed it. if doing save time might want @ @route
annotations actions, less of pain. if cannot without dynamic actions calls , not mind risk seek passing action's name parameter single controller method calls appropriate method.
symfony2 routing action dynamically-generated
Comments
Post a Comment