minor fixes
This commit is contained in:
24
app/Models/Core/CartStorage.php
Normal file
24
app/Models/Core/CartStorage.php
Normal file
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\Core;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class CartStorage extends Model
|
||||
{
|
||||
protected $table = 'cart_storage';
|
||||
|
||||
protected $fillable = [
|
||||
'id', 'cart_data',
|
||||
];
|
||||
|
||||
public function setCartDataAttribute($value)
|
||||
{
|
||||
$this->attributes['cart_data'] = serialize($value);
|
||||
}
|
||||
|
||||
public function getCartDataAttribute($value)
|
||||
{
|
||||
return unserialize($value);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user