luffluo / laravel-settings
Package description here.
v1.2.4
2020-03-18 06:15 UTC
Requires
- php: >=7.0
This package is auto-updated.
Last update: 2024-10-18 16:36:15 UTC
README
Installing
$ composer require luffluo/laravel-settings:~1.2
如果要自定义配置,执行下面的命令发布配置文件
php artisan vendor:publish --provider="Luffluo\LaravelSettings\ServiceProvider" --tag="config"
Usage
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
License
MIT