vgplay / laravel-cached-setting
Library for caching website configuration
2.1.2
2022-06-02 03:20 UTC
Requires
- php: ^7.0
- laravel/framework: ^6.0|^7.0|^8.0
- vgplay/laravel-redis-model: ^1.0.1
README
- setting('key', fallbackValue)
$key = setting('fb_app_id', '1312435342342');
- set_setting('key', $newValue);
set_setting('release_time', '2021-12-30 00:00:00');
- Create setting variable and save to database
use Vgplay\LaravelCachedSetting\Setting\SettingCreater; function create(SettingCreater $creater) { $creater->create([ 'key' => 'fb_app_id', 'display_name' => 'Facebook App Id', 'data_type' => 'text', 'type' => 'Tab 1', 'group' => 'Social', 'value' => '1312435342342' ]); }