| 1 |
<?php |
| 2 |
|
| 3 |
namespace FluentCart\App\Models; |
| 4 |
|
| 5 |
/** |
| 6 |
* Label Model - DB Model for Label table |
| 7 |
* |
| 8 |
* Database Model |
| 9 |
* |
| 10 |
* @package FluentCart\App\Models |
| 11 |
* |
| 12 |
* @version 1.0.0 |
| 13 |
*/ |
| 14 |
class Label extends Model |
| 15 |
{ |
| 16 |
protected $table = 'fct_label'; |
| 17 |
|
| 18 |
protected $fillable = [ |
| 19 |
'value', |
| 20 |
]; |
| 21 |
|
| 22 |
protected $casts = [ |
| 23 |
'id' => 'integer', |
| 24 |
]; |
| 25 |
|
| 26 |
public function setValueAttribute( $value ) { |
| 27 |
$this->attributes['value'] = maybe_serialize($value); |
| 28 |
} |
| 29 |
|
| 30 |
|
| 31 |
public function getValueAttribute( $value ) { |
| 32 |
return maybe_unserialize($value); |
| 33 |
} |
| 34 |
} |
| 35 |
|