Kaynağa Gözat

update: reset server log period

tokumeikoi 2 yıl önce
ebeveyn
işleme
ac47a879fa
1 değiştirilmiş dosya ile 3 ekleme ve 2 silme
  1. 3 2
      app/Console/Commands/ResetLog.php

+ 3 - 2
app/Console/Commands/ResetLog.php

@@ -3,6 +3,7 @@
 namespace App\Console\Commands;
 
 use App\Models\Plan;
+use App\Models\StatServer;
 use App\Models\StatUser;
 use App\Utils\Helper;
 use Illuminate\Console\Command;
@@ -43,7 +44,7 @@ class ResetLog extends Command
      */
     public function handle()
     {
-        StatUser::where('record_at', '<', strtotime('-2 month', time()))
-            ->delete();
+        StatUser::where('record_at', '<', strtotime('-2 month', time()))->delete();
+        StatServer::where('record_at', '<', strtotime('-2 month', time()))->delete();
     }
 }