firefly-iii/app/Models/AccountMeta.php
2015-02-06 05:04:06 +01:00

25 lines
411 B
PHP

<?php namespace FireflyIII\Models;
use Illuminate\Database\Eloquent\Model;
class AccountMeta extends Model
{
public function account()
{
return $this->belongsTo('Account');
}
public function getDataAttribute($value)
{
return json_decode($value);
}
public function setDataAttribute($value)
{
$this->attributes['data'] = json_encode($value);
}
}