A simple way to manage your settings in Laravel without the complexity of packages like spatie/laravel-settings
.
Breaking Changes in Laravel Settings >v1
"require": {
"sgtcoder/laravel-settings": "dev-develop"
}
"repositories": [
{
"type": "vcs",
"url": "https://github.com/sgtcoder/laravel-settings"
}
]
"require": {
"sgtcoder/laravel-settings": "dev-master"
}
"repositories": [
{
"type": "vcs",
"url": "https://github.com/<workspace>/laravel-settings"
}
]
composer update
Publishes config file
php artisan vendor:publish --tag laravel-settings
settings()->get('setting_name');
settings('general')->get('setting_name');
settings()->get('setting_name', $media = true);
settings('general')->get('setting_name', $media = true);
settings()->get();
settings('general')->get();
settings()->grouped()->get();
settings()->grouped('general')->get();
settings()->grouped('general')->get('setting_name');
settings()->set($settings);
settings('general')->set($settings);
settings()->setAttribute('setting_name', 'setting_value');
settings('general')->setAttribute('setting_name', 'setting_value');
settings()->replace($settings);
settings('general')->replace($settings);
The MIT License (MIT). Please see License File for more information.