Improving Environment Values in Aura v2
·208 words·1 min
Aura v2 framework probably have missed a better way to handle environment variables. But that doesn’t make you stall. Things can be improved ;-).
Assume you are already using aura framework and is at root of the project.
We are going to make use of vlucas/phpdotenv , alternatives are there if you are interested to experiment.
1 composer require vlucas/phpdotenv Edit the file config/_env.php and add Dotenv::load(/path/to/.env); to the first line. If you have not modified anything it will look as below