. * * @package LibreNMS * @link http://librenms.org * @copyright 2018 Tony Murray * @author Tony Murray */ namespace App\Models; class Config extends BaseModel { public $timestamps = false; protected $table = 'config'; public $primaryKey = 'config_id'; protected $fillable = [ 'config_name', 'config_value', ]; protected $casts = [ 'config_default' => 'array' ]; public function getConfigValueAttribute($value) { return json_decode($value); } public function setConfigValueAttribute($value) { $this->attributes['config_value'] = json_encode($value, JSON_UNESCAPED_SLASHES); } }