osb/app/Models/Charge.php

17 lines
344 B
PHP
Raw Permalink Normal View History

2018-08-01 07:09:38 +00:00
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class Charge extends Model
{
protected $table = 'ab_charge';
protected $dates = ['date_charge'];
public $dateFormat = 'U';
2018-08-01 07:09:38 +00:00
public function getNameAttribute()
{
return sprintf('%s %s',$this->description,join('|',unserialize($this->getAttribute('attributes'))));
}
}