diff --git a/app/Endpoint/Api/Http/Controllers/StoreController.php b/app/Endpoint/Api/Http/Controllers/StoreController.php index 1ae01c9a..f511c14b 100644 --- a/app/Endpoint/Api/Http/Controllers/StoreController.php +++ b/app/Endpoint/Api/Http/Controllers/StoreController.php @@ -49,9 +49,8 @@ class StoreController extends Controller $list = $store->productSpus() ->with(['specs']) ->filter($input) - ->field(['product_spus.id']) ->wherePivot('status', 1) - ->groupBy('product_spus.id') + ->distinct('product_spus.id') ->simplePaginate(Paginator::resolvePerPage('per_page', 20, 50)); return StoreProductSpuResource::collection($list);