Downloads
Stars
Version
This package allows you to save the configuration in a more persistent way. Use the database to save your settings, you can save values in json format. You can also override the Laravel configuration.
Run the following command:
composer require wimil/settings
Register the service provider in config/app.php
Wimil\Settings\Provider::class,
Add alias if you want to use the facade.
'Settings' => Wimil\Settings\Facade::class,
Publish config file.
php artisan vendor:publish --provider="Wimil\Settings\Provider"
You can change the options of your app from config/settings.php
file
You can either use the helper method like settings('foo')
or the facade Settings::get('foo')
Settings::get('foo');
Settings::set('foo', 'bar');
$settings = Settings::all();
settings('foo');
settings('foo', 'bar');
$settings = settings();
use Wimil\Settings\Model\Setting as BaseSetting;
class Setting extends BaseSetting {
}