resetExpiredUserPlan(); } private function resetExpiredUserPlan($day = 14) { User::where('expired_at', '<', $day * 86400)->update([ 'plan_id' => NULL, 'group_id' => NULL ]); } }