Tokumeikoi 5 years ago
parent
commit
e5c207ccff
1 changed files with 6 additions and 5 deletions
  1. 6 5
      app/Console/Commands/ResetTraffic.php

+ 6 - 5
app/Console/Commands/ResetTraffic.php

@@ -54,11 +54,12 @@ class ResetTraffic extends Command
 
     private function resetByMonthFirstDay($user):void
     {
-        if ((string)date('d') !== '1') return
-        $user->update([
-            'u' => 0,
-            'd' => 0
-        ]);
+        if ((string)date('d') === '01') {
+            $user->update([
+                'u' => 0,
+                'd' => 0
+            ]);
+        }
     }
 
     private function resetByExpireDay($user):void