4 years ago

.env vs config files

Posted 4 years ago by goatshark

Hello there,

I'm trying to decide whether or not to keep configuration/environment variables in .env or in a config/ file. Where do you like to keep them? What are the pros and cons to each? As far as I can tell, I suspect that a config file is preferred because config file options can be cached with config:cache.

Either way, it seems that you would be configuring whichever one you choose for each deployment, so ease of deployment doesn't seem to be the driver for the choice.

Thoughts? Am I missing something here?

Please sign in or create an account to participate in this conversation.