Hi
I new user in YII2.
I have some question with environment. I use advanced template
- If I want to set database access on my local machine I add it on /env/commons/config/{dev or prod}/main-local.php
But from documentation it need add in /commons/config/main-local.php
If I do it as documantation, when I change, on local machine, environment to production (yii copy local files from env/prod/comons/* to /commons/* ) it overwrite my connect to db.
But if I add my database access or any else in /env/dev/commons/config/main-local.php It force to reload (php init) every time.
How to do it correctly?
- True or false follows:
common/config/main.php - all settings on dev and prod env. in all computers.
common/config/main-local.php - not write here. it overwrite from env. dir.
environments/dev/common/config/main-local.php - local settings in dev env. individual on each computer. it use when init dev environment. when init dev this file rewrites common/config/main-local.php
Thanks