Saturday, 15 June 2013

symfony2 - Define route without ending slash when importing route in Symfony 2.5? -



symfony2 - Define route without ending slash when importing route in Symfony 2.5? -

in file: hardcoremore/hrapibundle/resources/config/routing.yml

i have imported route this:

hr_api_company: resource: "@hrapibundle/resources/config/routing/company.yml" prefix: /company

and in file: hardcoremore/hrapibundle/resources/config/routing/company.yml

i have defined route creating company this:

hardcoremore_hr_api_company_create: pattern: / defaults: { _controller: hrapibundle:company:create } methods: [post]

now route matched next url:

post company/

but not matched when called with:

post company

how can define route without ending slash when importing route , prefixing it?

this not possible, see : https://github.com/symfony/symfony/issues/4322

i hope has helped

symfony2 url-routing yaml routes

No comments:

Post a Comment