33 lines
994 B
PHP
Raw Normal View History

2017-09-14 22:21:00 +03:00
<?php
2017-10-16 21:02:32 +03:00
namespace App\Transformers\Setting;
2017-09-14 22:21:00 +03:00
use App\Models\Setting\Currency as Model;
use League\Fractal\TransformerAbstract;
class Currency extends TransformerAbstract
{
/**
* @param Model $model
* @return array
*/
public function transform(Model $model)
{
return [
'id' => $model->id,
'company_id' => $model->company_id,
'name' => $model->name,
'code' => $model->code,
'rate' => $model->rate,
'enabled' => $model->enabled,
2017-12-09 16:24:18 +03:00
'precision' => $model->precision,
'symbol' => $model->symbol,
'symbol_first' => $model->symbol_first,
'decimal_mark' => $model->decimal_mark,
'thousands_separator' => $model->thousands_separator,
2019-11-16 10:21:14 +03:00
'created_at' => $model->created_at ? $model->created_at->toIso8601String() : '',
'updated_at' => $model->updated_at ? $model->updated_at->toIso8601String() : '',
2017-09-14 22:21:00 +03:00
];
}
}