Answer the question
In order to leave comments, you need to log in
How to set default controller in subdirectory in Yii2?
Greetings, friends.
Is it possible, and if so, how to set a default controller for subdirectories in Yii?
For example, there is a controllers folder and it contains the SiteController file, and when the main page of the site is requested, it is the SiteController controller that works by default. And how to make it possible to set a default controller in a subdirectory too? For example, to get something like this controllers/user/defaultController.php and when accessing example.com/user, the defaultController controller worked.
I tried to set the name indexController, defaultController and siteController, but all in vain.
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