wesmiler il y a 5 mois
Parent
commit
7c04a1a40a
1 fichiers modifiés avec 1 ajouts et 0 suppressions
  1. 1 0
      app/Services/Api/CartService.php

+ 1 - 0
app/Services/Api/CartService.php

@@ -100,6 +100,7 @@ class CartService extends BaseService
         }
 
         $model = $this->model->with(['store','cartGoods'])
+            ->withCount(['cartGoods'])
             ->from('carts as a')
             ->leftJoin('goods as b', 'b.id', '=', 'a.goods_id')
             ->where($where)