wesmiler 3 ヶ月 前
コミット
7c04a1a40a
1 ファイル変更1 行追加0 行削除
  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)