AH
Size: a a a
AH
AB
AB
AH
AH
V
AH
AB
AB
AB
V
AB
AH
AB
$newVariation = new ProductVariationResource(ProductVariation::where('id', $product['productVariation']['id'])->first());
ресурсpublic function toArray($request)
{
$price = $this->product_stores()->first()->price ?? 0;
$prices = Money::getConvertPrice($request->all()['currencyType'], $price);
return [
'id' => $this->id,
'name_fstek' => $this->name_fstek,
'weight' => $this->weight,
'length' => $this->length,
'width' => $this->width,
'height' => $this->height,
'price' => $prices['price'],
'price_string' => $prices['price_string'],
'product_id' => $this->product_id,
// 'product_store' => new ProductStore($this->product_stores->first()),
'product_items' => new ProductItems($this->items->first()),
];
}
AH
$newVariation = new ProductVariationResource(ProductVariation::where('id', $product['productVariation']['id'])->first());
ресурсpublic function toArray($request)
{
$price = $this->product_stores()->first()->price ?? 0;
$prices = Money::getConvertPrice($request->all()['currencyType'], $price);
return [
'id' => $this->id,
'name_fstek' => $this->name_fstek,
'weight' => $this->weight,
'length' => $this->length,
'width' => $this->width,
'height' => $this->height,
'price' => $prices['price'],
'price_string' => $prices['price_string'],
'product_id' => $this->product_id,
// 'product_store' => new ProductStore($this->product_stores->first()),
'product_items' => new ProductItems($this->items->first()),
];
}
AB
AH
$newVariation = new ProductVariationResource(ProductVariation::where('id', $product['productVariation']['id'])->first());
ресурсpublic function toArray($request)
{
$price = $this->product_stores()->first()->price ?? 0;
$prices = Money::getConvertPrice($request->all()['currencyType'], $price);
return [
'id' => $this->id,
'name_fstek' => $this->name_fstek,
'weight' => $this->weight,
'length' => $this->length,
'width' => $this->width,
'height' => $this->height,
'price' => $prices['price'],
'price_string' => $prices['price_string'],
'product_id' => $this->product_id,
// 'product_store' => new ProductStore($this->product_stores->first()),
'product_items' => new ProductItems($this->items->first()),
];
}
$request->all()['currencyType']бляяяяя
$request->get('currencyType')
для кого придумали?AH
AB
AB