前台只显示启用商品
This commit is contained in:
parent
3002721a48
commit
728c5a7671
|
|
@ -44,7 +44,7 @@ class ProductRepo
|
|||
*/
|
||||
public static function getProductsByCategory($categoryId): AnonymousResourceCollection
|
||||
{
|
||||
$builder = self::getBuilder(['category_id' => $categoryId]);
|
||||
$builder = self::getBuilder(['category_id' => $categoryId, 'active' => 1]);
|
||||
$products = $builder->with('inCurrentWishlist')->get();
|
||||
return ProductSimple::collection($products);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue