2017-09-14 22:21:00 +03:00
|
|
|
<?php
|
|
|
|
|
2019-12-31 15:49:09 +03:00
|
|
|
namespace App\Transformers\Purchase;
|
2017-09-14 22:21:00 +03:00
|
|
|
|
2020-12-24 01:28:38 +03:00
|
|
|
use App\Models\Document\DocumentHistory as Model;
|
2017-09-14 22:21:00 +03:00
|
|
|
use League\Fractal\TransformerAbstract;
|
|
|
|
|
|
|
|
class BillHistories extends TransformerAbstract
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* @param Model $model
|
|
|
|
* @return array
|
|
|
|
*/
|
|
|
|
public function transform(Model $model)
|
|
|
|
{
|
|
|
|
return [
|
|
|
|
'id' => $model->id,
|
|
|
|
'company_id' => $model->company_id,
|
|
|
|
'bill_id' => $model->bill_id,
|
2020-01-11 16:57:32 +03:00
|
|
|
'status' => $model->status,
|
2017-09-14 22:21:00 +03:00
|
|
|
'notify' => $model->notify,
|
|
|
|
'description' => $model->description,
|
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
|
|
|
];
|
|
|
|
}
|
|
|
|
}
|