Ken 5 dagar sedan
förälder
incheckning
a8ed944e0d
1 ändrade filer med 8 tillägg och 0 borttagningar
  1. 8 0
      app/Models/Config.php

+ 8 - 0
app/Models/Config.php

@@ -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]);