I am building an application where I need to work on two git branch. For two branch, I need to maintain two database and every time I checkout to another branch I need to manually change database from .env
file. (env
file is included in .gitignore
file)
Is there any way to access config
variables from env
? I tried this below way:
DB_DATABASE="${config('database.database')}"
But it is not working.
Note: I could do it by changing in config/database.php
but I am in restriction that's why trying to find another way.