mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
17 lines
358 B
PHP
17 lines
358 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
class ComponentPref extends Model
|
|
{
|
|
public $timestamps = false;
|
|
protected $fillable = ['component', 'attribute', 'value'];
|
|
|
|
public function setValueAttribute($value)
|
|
{
|
|
$this->attributes['value'] = is_array($value) ? json_encode($value) : (string) $value;
|
|
}
|
|
}
|