firefly-iii/app/Models/AccountMeta.php
2015-02-07 12:15:53 +01:00

29 lines
517 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);
}
public function getDates()
{
return ['created_at', 'updated_at'];
}
}