bebeboutik-api/app/Models/Product/ProductCart.php

21 lines
477 B
PHP
Raw Normal View History

<?php
namespace App\Models\Product;
use Antadis\API\Front\Models\Product\ProductCart as BaseProduct;
use App\Classes\ImageTrait;
class ProductCart extends BaseProduct {
use ImageTrait;
/**
* {@inheritdoc}
*/
public function toArray() {
$product = parent::toArray();
$image = $this->getCover($this->id);
$product['img'] = $this->getProductImage($image['id_image'], $this->link_rewrite, 'home');
return $product;
}
}