From e29261a87f261e46e98208520f47fd158bb34ccf Mon Sep 17 00:00:00 2001 From: tokumeikoi Date: Sun, 26 Dec 2021 19:35:24 +0800 Subject: [PATCH] update: get reset day --- app/Http/Controllers/User/UserController.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/Http/Controllers/User/UserController.php b/app/Http/Controllers/User/UserController.php index b5207a80..4b664728 100755 --- a/app/Http/Controllers/User/UserController.php +++ b/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'));