商品详情页
This commit is contained in:
parent
0a70373fc1
commit
5fc7893764
|
|
@ -14,7 +14,7 @@ class ProductController extends Controller
|
|||
$product = ProductRepo::getProductDetail($product);
|
||||
|
||||
$data = [
|
||||
'product' => (new ProductDetail($product)),
|
||||
'product' => (new ProductDetail($product))->jsonSerialize(),
|
||||
];
|
||||
|
||||
return view('product', $data);
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ class ProductDetail extends JsonResource
|
|||
'image' => image_resize($this->image),
|
||||
'category_id' => $this->category_id ?? null,
|
||||
'variables' => json_decode($this->variables),
|
||||
'skus' => SkuDetail::collection($this->skus),
|
||||
'skus' => SkuDetail::collection($this->skus)->jsonSerialize(),
|
||||
];
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue