$ composer require luffluo/laravel-settings:~1.2
php artisan vendor:publish --provider="Luffluo\LaravelSettings\ServiceProvider" --tag="config"
Add the middleware 'Luffluo\LaravelSettings\SaveMiddleware' to your middleware for Auto save.
<?php
setting('key', 'default'); // get
setting(['key' => 'value'])->save(); // set
setting()->all(); // get all
setting()->forget('key')->save(); // forget
setting()->forgetAll()->save(); // forget all
MIT