A
A
Alexey Verkhovtsev2017-11-02 13:06:35
symfony
Alexey Verkhovtsev, 2017-11-02 13:06:35

How to use routing php for Symfony 3?

Hello. I just started learning Symfony 3 and I have a question. How to use a php file to set routes, yes, through annotations and through the routing.yml file, but I would like more, using PHP as in the examples. I understand that annotations are connected in the routing.yml file

app:
    resource: '@AppBundle/Controller/'
    type: annotation

Therefore, the PHP file needs to be cut from there, but how? If I place the file at //app/config/routing.php
then.
Thanks in advance

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question