diff --git a/app/Admin/Controllers/Coupon/IndexController.php b/app/Admin/Controllers/Coupon/IndexController.php index 884229c..0f152f8 100644 --- a/app/Admin/Controllers/Coupon/IndexController.php +++ b/app/Admin/Controllers/Coupon/IndexController.php @@ -130,16 +130,16 @@ class IndexController extends AdminController // $all = $query->get(); // $pass = $all->where('status', 2)->all(); // $pass = collect($pass); - $total = $query->count(); - $success = $query->where('status', 2)->count(); + $total = (clone $query)->count(); + $success = (clone $query)->where('status', 2)->count(); $faield = $total - $success; return '  ' .'  ' .'  ' - .'  ' - .'  ' - .'