<?php

namespace App\Models;

use App\Services\Repositories\ProductRepository;
use Illuminate\Database\Eloquent\Model;

class Cart extends Model
{
    public $timestamps = false;

    protected $fillable = [
        'count',
        'user_id',
        'product_id',
    ];

    public function getProductAttribute()
    {
        $product = (new ProductRepository())->getItem($this->product_id);
        return $product;
    }


}
