Answer the question
In order to leave comments, you need to log in
How to modify Laravel 5 configuration files?
I want to edit the configuration via the WEB, hence it is interesting: how exactly to save the settings programmatically?
What is a good practice to save/change the values of laravel config files?
For myself, I see two options:
-Storage in .env of all values? (then how to save to env-file?)
-Storage in app/config/*.php (how to save settings there?)
PS. Do not suggest a way:
Display all the settings, and change the necessary, and then overwrite the configuration file.
Interested, it is the change that is necessary, and not all together .
P.P.S. Config::set() - saves only at the moment of the current connection, thus not affecting the configuration file.
Answer the question
In order to leave comments, you need to log in
You don't need to take everything out. It's easier to use Setting packages, sobsno there and write down the values used. And overwriting config files is a game)))
https://github.com/daftspunk/laravel-config-writer just don't know if it works now or not. In general, rarely changed settings are stored in configs - you are unlikely to need to change, for example, data for accessing the database or transfer the application to test mode on a live application. For everything else, it's probably better to use a separate table in the database.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question