osb/app/Models/Charge.php
2019-07-04 14:55:05 +10:00

17 lines
344 B
PHP

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