FleetCart/Modules/Setting/Entities/SettingTranslation.php

42 lines
755 B
PHP
Raw Normal View History

2023-06-11 12:14:03 +00:00
<?php
namespace Modules\Setting\Entities;
use Modules\Support\Eloquent\TranslationModel;
class SettingTranslation extends TranslationModel
{
/**
* The attributes that are mass assignable.
*
* @var array
*/
protected $fillable = ['value'];
2023-12-03 14:07:47 +00:00
2023-06-11 12:14:03 +00:00
/**
* Get the value of the setting.
*
* @param mixed $value
2023-12-03 14:07:47 +00:00
*
2023-06-11 12:14:03 +00:00
* @return mixed
*/
public function getValueAttribute($value)
{
return unserialize($value);
}
2023-12-03 14:07:47 +00:00
2023-06-11 12:14:03 +00:00
/**
* Set the value of the setting.
*
* @param mixed $value
2023-12-03 14:07:47 +00:00
*
2023-06-11 12:14:03 +00:00
* @return mixed
*/
public function setValueAttribute($value)
{
$this->attributes['value'] = serialize($value);
}
}