laravel-settings
laravel-settings copied to clipboard
ToDo : Get config file value if doesn't exist in Setting
Hi,
Thank so much for this nice package,
I've a suggestion :
It's a good idea to add a function that retrieves a value from a file config when it doesn't exist in Setting table,
Example:
$value = Setting::get('file.name'); // It returns config('file.name').
Thanks :)
Excellent idea.
The long one would be use the default value parameter, it's very redundant:
$value = Setting::get('file.name', config('file.name'));
perhaps adding a setFallback() method, and can be use like:
Settings::setFallback(function ($key, $default) {
return config($key, $default);
});
what do you think? @AEK-BKF