File "CartItem.php"
Full Path: /home/clickysoft/public_html/jmapi5.clickysoft.net/app/Models/CartItem.php
File size: 720 bytes
MIME-type: text/x-php
Charset: utf-8
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class CartItem extends Model
{
use HasFactory;
protected $fillable = [
'cart_id',
'attribute_id',
'attribute_option_id',
];
protected $dates = [
'created_at',
'updated_at',
];
protected $casts = [
'created_at' => 'date:m-d-Y',
'updated_at' => 'date:m-d-Y',
];
public function attribute()
{
return $this->belongsTo(Attribute::class, 'attribute_id');
}
public function attributeOption()
{
return $this->belongsTo(AttributeOption::class, 'attribute_option_id');
}
}