21 lines
477 B
PHP
21 lines
477 B
PHP
<?php
|
|
|
|
namespace App\Models\Product;
|
|
|
|
use Antadis\API\Front\Models\Product\ProductList as BaseProduct;
|
|
use App\Classes\ImageTrait;
|
|
|
|
class ProductList 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;
|
|
}
|
|
}
|