<?php

namespace App\Helpers;

use App\Model\Product;

class RecentProducts extends RecentItems
{

    private $limit = 20;
    public $store_key = 'recent_products';
    public $model = Product::class;
    public $model_with = ['photo'];

    public function add($item)
    {
        $item = is_object($item) ? $item->id : $item;
        parent::add($item);
    }

}
