vgplay/laravel-cached-setting

Library for caching website configuration

2.1.2 2022-06-02 03:20 UTC

This package is auto-updated.

Last update: 2024-11-10 16:16:05 UTC


README

  1. setting('key', fallbackValue)
$key = setting('fb_app_id', '1312435342342');
  1. set_setting('key', $newValue);
set_setting('release_time', '2021-12-30 00:00:00');
  1. 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'
    ]);
}