product detail
This commit is contained in:
parent
e0330b7b0f
commit
bbfacd0934
|
|
@ -60,8 +60,15 @@ class Products extends ProductController
|
|||
|
||||
public function product($id){
|
||||
$product = $this->productRepository->select('id','attribute_family_id','type','brand_id')
|
||||
->with(['brand','related_products'=> fn($rp) => $rp->select('id','type','attribute_family_id','brand_id')->with('brand'),
|
||||
->with(['brand','related_products'=> fn($rp) => $rp->select('id','type','attribute_family_id','brand_id')
|
||||
->with('brand')
|
||||
->whereHas('product_flat', function($qwh){
|
||||
$qwh->where('status',1);
|
||||
}),
|
||||
'variants' => function($query){
|
||||
$query->whereHas('product_flat', function($qwh){
|
||||
$qwh->where('status',1);
|
||||
});
|
||||
$query->with(['product_flats' => function($qf){
|
||||
$channel = core()->getRequestedChannelCode();
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue