refs #273 change solution system

This commit is contained in:
cuneytsenturk
2018-07-11 14:05:42 +03:00
parent da091525b0
commit 5503e546c1
14 changed files with 99 additions and 208 deletions

View File

@@ -132,6 +132,17 @@ class Revenue extends Model
$this->attributes['currency_rate'] = (double) $value;
}
/**
* Convert paid_at to datetime.
*
* @param string $value
* @return void
*/
public function setPaidAtAttribute($value)
{
$this->attributes['paid_at'] = $value . ' ' . Date::now()->format('H:i:s');
}
public function scopeLatest($query)
{
return $query->orderBy('paid_at', 'desc');