Answer the question
In order to leave comments, you need to log in
How to redirect to another controller within the same router?
There is Symfony 5.3.5.
Let's say we have a router with a /reports link that leads to the ReportController controller.
There are two types of users in the system: employees and customers. How to make the employee lead to the ReportController controller, and the client to the ReportClientController, while there is only one link.
I thought to make a check in the controller for employees and then "change" the controller, but somehow it's not quite "beautiful", maybe there is some beautiful solution.
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question