mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2024-11-27 03:10:32 -06:00
25 lines
429 B
PHP
25 lines
429 B
PHP
<?php namespace FireflyIII\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
class AccountMeta extends Model
|
|
{
|
|
|
|
public function account()
|
|
{
|
|
return $this->belongsTo('FireflyIII\Models\Account');
|
|
}
|
|
|
|
|
|
public function getDataAttribute($value)
|
|
{
|
|
return json_decode($value);
|
|
}
|
|
|
|
public function setDataAttribute($value)
|
|
{
|
|
$this->attributes['data'] = json_encode($value);
|
|
}
|
|
|
|
}
|