<?php

namespace App\Http\Resources;

use Illuminate\Http\Resources\Json\JsonResource;

class CobrosLista extends JsonResource
{
    /**
     * Transform the resource into an array.
     *
     * @param  \Illuminate\Http\Request  $request
     * @return array
     */
    public function toArray($request)
    {
        return [
            "idCobrosLista"     => strval($this->idCobrosLista),
            "dateCobrosLista"   => date("Y-m-d H:i:s",strtotime($this->dateCobrosLista)),
            "idEUser"           => strval($this->idEUser),
            "typeCobrosLista"   => $this->typeCobrosLita,
            "dateCobro"         => date("Y-m-d",strtotime($this->dateCobro)),
        ];

    }
}
