I’ve just been added to a huge project at my company that’s using Yii2. This project has a controller called UserController, which is used throughout the project. I’ve added a module, which I need to accomplish some of the tasks I’ve been assigned. Unfortunately, the module is named ‘user’. So after I added the module, the app can no longer access the actions in the UserController. For example, if I try to navigate to ‘/user/index’ it will look in the ‘user’ moudle for a controller called ‘index’, rather than looking for an action in the UserController for an action called ‘index’.
I know that I could change the name of the UserController, then go through the entire project and find everywhere that it’s used and change it, but that could take days. Is there any other way out of this situation? Is there some way to redirect to the controller if the route is not found in the module? Any help at all would be greatly appreciated.