I
I
Ilya Antipenko2014-10-15 14:16:32
Software Deployment
Ilya Antipenko, 2014-10-15 14:16:32

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

1 answer(s)
V
Vyacheslav Plisko, 2014-10-15
@AmdY

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 question

Ask a Question

731 491 924 answers to any question