<?php

namespace Modules\Factor\Transformers;

use Illuminate\Http\Resources\Json\JsonResource;

class ChequeFactorsListResource extends JsonResource
{
    /**
     * Transform the resource into an array.
     *
     * @param  \Illuminate\Http\Request
     * @return array
     */
    public function toArray($request)
    {
        return [
            'label'=>$this->customer->first_name.' '.$this->customer->last_name. str_repeat(" ", 5) .number_format($this->price),
            'value'=>$this->id,

        ];
    }
}
