It would be nice to be able to use variables in the .env file similar to Laravel.
PROTOCOL=https://
HOST_NAME=dev.mysite.com
HTTP_PORT=443
APP_URL=${PROTOCOL}${HOST_NAME}:${HTTP_PORT}
PHP DotEnv reference: https://github.com/vlucas/phpdotenv#nesting-variables
Is this what you're wanting? https://github.com/motdotla/dotenv#what-about-variable-expansion
@zenflow - it seems similar but the variable-expansion you referenced seems to be limited to machine variables rather than other variables in the same .env file.
The example .env file in that project seems to indicate you can use variables from the same .env file (e.g. look at MONGOLAB_USER). If you tested and it doesn't work, I'd open an issue there.
hmm - i looked at that .env example previously and did not see an example of re-using a variable that was defined in that same file. i'll check again.
ok - yeah i see now. the MONGOLAB_USER you referenced. thanks!
Most helpful comment
The example .env file in that project seems to indicate you can use variables from the same .env file (e.g. look at
MONGOLAB_USER). If you tested and it doesn't work, I'd open an issue there.