I\'ve read through Yii2 documentation several times. I also googled and I couldn\'t find anything useful yet.
The problem is I do not understand the concept of the envi
First of all you don't need to put controllers and views in environment folder. environment
folder contains files that contain different configuration for different environments.
For example in frontend/web/index.php
file you would want to set YII_ENV
to prod
while in production environment and to dev
while in development environment. In environment
folder this file is already available with those specific settings in specific folders.
So as explained Here, all you need to do is run the init
command and choose your environment and it will put environment specific files in their proper location.