mirror of
https://github.com/kevin-DL/LaravelShoppingcart.git
synced 2026-01-11 18:54:33 +00:00
Update CartItemModel.php
This commit is contained in:
@@ -38,6 +38,14 @@ class CartItemModel extends Model
|
|||||||
protected $casts = [
|
protected $casts = [
|
||||||
'options' => 'array', // Stored as JSON string, cast to array
|
'options' => 'array', // Stored as JSON string, cast to array
|
||||||
];
|
];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the parent commentable model (post or video).
|
||||||
|
*/
|
||||||
|
public function model()
|
||||||
|
{
|
||||||
|
return $this->morphTo();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the CartItems for the cart.
|
* Get the CartItems for the cart.
|
||||||
|
|||||||
Reference in New Issue
Block a user