|
|
@@ -23,8 +23,16 @@ class Config extends BaseModel
|
|
|
|
|
|
public static function setPc28Switch()
|
|
|
{
|
|
|
+
|
|
|
$pc28_switch = Cache::get('pc28_switch');
|
|
|
$val = static::where('field', 'pc28_switch')->first()->val;
|
|
|
+ $m = new Message();
|
|
|
+ $m->json = json_encode([
|
|
|
+ 'pc28_switch'=>$pc28_switch,
|
|
|
+ 'val' => $val
|
|
|
+ ]);
|
|
|
+ $m->save();
|
|
|
+
|
|
|
if ($pc28_switch == null) $pc28_switch = $val;
|
|
|
if ($pc28_switch !== $val) {
|
|
|
static::where('field', 'pc28_switch')->update(['val' => $pc28_switch]);
|