D
D
d999992021-03-05 18:20:21
symfony
d99999, 2021-03-05 18:20:21

How to specify a value dynamically in a parameter set in annotations.yaml in Symfony 5?

controllers:
    resource: ../../src/Controller/
    type: annotation
    prefix: /{locale_annotation}
    requirements:
        locale_annotation: en|ru|uk
    defaults:
        locale_annotation: 'en

It is necessary that the locale is set dynamically and in this way I can dynamically change the path in routes and links generated using path

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Maxim, 2021-03-05
@d99999

If you read the documentation and more , then you would not ask such a question

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question