diff --git a/src/Controller/CategoryController.php b/src/Controller/CategoryController.php index a6dafcb..d5afe47 100644 --- a/src/Controller/CategoryController.php +++ b/src/Controller/CategoryController.php @@ -13,6 +13,7 @@ final class CategoryController extends BaseController { $products = Product::with('price') ->selectRaw('products.*') + ->distinct('products.id') ->fromRaw('products, json_each(products.categories)') ->whereRaw('json_each.value = ?', [$category]) ->orderByDesc('starred')