7. Add custom environment variables¶
If your application requires a variable to determine if it is run under development or production, you can easily add it and make PHP aware of it.
Table of Contents
This is fairly simple. Any variable inside the
.env file is considered an environment variable
and automatically known to PHP.
If you for example require a variable
APPLICATION_ENV, with a value of
would add the following to the
You need to restart the Devilbox for the changes to take effect.
There is already a proposed section inside the
.env file at the very bottom
to add you custom variables to differentiate them from the Devilbox required variables.