Browse Source

update: get reset day

tokumeikoi 3 năm trước cách đây
mục cha
commit
e29261a87f
1 tập tin đã thay đổi với 2 bổ sung0 xóa
  1. 2 0
      app/Http/Controllers/User/UserController.php

+ 2 - 0
app/Http/Controllers/User/UserController.php

@@ -189,6 +189,8 @@ class UserController extends Controller
     private function getResetDay(User $user)
     {
         if ($user->expired_at <= time() || $user->expired_at === NULL) return null;
+        // if reset method is not reset
+        if (isset($user->plan->reset_traffic_method) && $user->plan->reset_traffic_method === 2) return null;
         $day = date('d', $user->expired_at);
         $today = date('d');
         $lastDay = date('d', strtotime('last day of +0 months'));