mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-11-11 20:28:14 +00:00
References
This commit is contained in:
@@ -5,6 +5,19 @@ use Illuminate\Database\Eloquent\Model;
|
||||
class Preference extends Model
|
||||
{
|
||||
|
||||
//
|
||||
public function getDataAttribute($value)
|
||||
{
|
||||
return json_decode($value);
|
||||
}
|
||||
|
||||
public function setDataAttribute($value)
|
||||
{
|
||||
$this->attributes['data'] = json_encode($value);
|
||||
}
|
||||
|
||||
public function user()
|
||||
{
|
||||
return $this->belongsTo('User');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user