mirror of
https://github.com/kevin-DL/LaravelShoppingcart.git
synced 2026-01-23 07:31:31 +00:00
Update CartModel.php
This commit is contained in:
@@ -12,7 +12,7 @@ class CartModel extends Model
|
|||||||
*
|
*
|
||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
protected $table = Config::get('cart.database.tables.cart_item');
|
protected $table = Config::get('cart.database.tables.cart');
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The attributes that are mass assignable.
|
* The attributes that are mass assignable.
|
||||||
@@ -20,22 +20,8 @@ class CartModel extends Model
|
|||||||
* @var array
|
* @var array
|
||||||
*/
|
*/
|
||||||
protected $fillable = [
|
protected $fillable = [
|
||||||
'row_id',
|
'identifier',
|
||||||
'cart_id',
|
'instance',
|
||||||
'price',
|
|
||||||
'discount_rate',
|
|
||||||
'discount_fixed',
|
|
||||||
'taxRate',
|
|
||||||
'options'
|
|
||||||
];
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The attributes that should be cast.
|
|
||||||
*
|
|
||||||
* @var array
|
|
||||||
*/
|
|
||||||
protected $casts = [
|
|
||||||
'options' => 'array', // Stored as JSON string, cast to array
|
|
||||||
];
|
];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user