Answer the question
In order to leave comments, you need to log in
Environment variables or config?
Hello.
There is a Laravel application and several environments (about 4).
Environment variables are now used to set parameters.
The question arose, what is better to use: environment variables or configs with environments?
Share your experience, pros and cons of solutions.
Thanks
Answer the question
In order to leave comments, you need to log in
Environment variables should never be used, this is recommended for all frameworks. Configs are merged based on the environment variable, this is enough and much more flexible, because it allows you to create any combination of configs, including changing them on the go.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question