diff --git a/app/Endpoint/Api/Http/Controllers/StoreController.php b/app/Endpoint/Api/Http/Controllers/StoreController.php index b27c8772..a7e95344 100644 --- a/app/Endpoint/Api/Http/Controllers/StoreController.php +++ b/app/Endpoint/Api/Http/Controllers/StoreController.php @@ -50,6 +50,7 @@ class StoreController extends Controller ->with(['specs']) ->filter($input) ->wherePivot('status', 1) + ->groupBy('store_product_skus.spu_id') ->simplePaginate(Paginator::resolvePerPage('per_page', 20, 50)); return StoreProductSpuResource::collection($list);