Answer the question
In order to leave comments, you need to log in
Where to write code that should always be executed?
Hello, tell me how to do this thing in Symfony 2.6: It is
necessary, after executing any request (including through the console), a certain service was called and worked out.
For example: a person comes to the main page, she went to him for rendering, and on the server, before the completion of the work, the necessary service was called.
The same thing with the command: they called the console command, and after its completion, the same service was called.
Answer the question
In order to leave comments, you need to log in
https://symfony.com/doc/current/components/http_ke...
UPD: and https://symfony.com/doc/current/components/console... (thanks to Maxim for the addition)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question