|
|
@@ -2,10 +2,13 @@
|
|
|
|
|
|
namespace App\Models;
|
|
|
|
|
|
+use Illuminate\Support\Facades\Cache;
|
|
|
+
|
|
|
class Config extends BaseModel
|
|
|
{
|
|
|
protected $table = 'config';
|
|
|
protected $fillable = ['field', 'val', 'remark', 'group_id'];
|
|
|
+
|
|
|
/*
|
|
|
* group_id
|
|
|
* 1 系统基础配置
|
|
|
@@ -15,4 +18,11 @@ class Config extends BaseModel
|
|
|
*
|
|
|
*
|
|
|
*/
|
|
|
+
|
|
|
+ public static function setPc28Switch()
|
|
|
+ {
|
|
|
+ $pc28_switch = Cache::get('pc28_switch');
|
|
|
+ static::where('field', 'pc28_switch')->update(['val' => $pc28_switch]);
|
|
|
+
|
|
|
+ }
|
|
|
}
|