Files
boursecu_server/app/Models/CartItem.php
T
2026-06-11 22:08:47 +03:30

34 lines
599 B
PHP

<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class CartItem extends Model
{
use HasFactory;
protected $table = 'cart_items';
protected $fillable = [
'cart_id',
'product_id',
'quantity',
'price',
'title',
'group_type',
'gold_price',
];
public function cart()
{
return $this->belongsTo(Cart::class);
}
protected function serializeDate(\DateTimeInterface $date)
{
return $date->format('Y-m-d H:i:s');
}
}