May I perform redirection to another controller within service?
I have implemented a service based on example provided by @Artamiel.
My function code which i
From an architecture point of view one should not create a RedirectResponse
in a service. One way could be to throw an exception in the service, which is caught in the controller's action where you can easily create a RedirectResponse
.
An example can be found here: Redirect from a Service in Symfony2