product detail

This commit is contained in:
merdan 2023-05-04 13:05:30 +05:00
parent 9ee6e09c64
commit c3a431f772
2 changed files with 4 additions and 4 deletions

View File

@ -98,7 +98,7 @@ class Products extends ProductController
return $product;
// return ProductDetail::make($product);
return ProductDetail::make($product);
}

View File

@ -25,8 +25,8 @@ class ProductDetail extends Product
'brand' => $product->brand->name ?? '',
'color' => $product->color,
'images' => ProductImage::collection($product->images),
'color_variants' => ColorVariant::collection($this->related_products->where('status',1)),
'size_variants' => SizeVariant::collection($this->variants->where('status',1)),
'color_variants' => ColorVariant::collection($this->related_products->where('status',true)),
'size_variants' => SizeVariant::collection($this->variants->where('status',true)),
/* special price cases */
$this->merge($this->specialPriceInfo()),