26 lines
629 B
PHP
26 lines
629 B
PHP
<?php
|
|
|
|
namespace App\Http\Resources;
|
|
|
|
use Illuminate\Http\Request;
|
|
use Illuminate\Http\Resources\Json\JsonResource;
|
|
|
|
class ClienteResource extends JsonResource
|
|
{
|
|
/**
|
|
* Transform the resource into an array.
|
|
*/
|
|
public function toArray(Request $request): array
|
|
{
|
|
return [
|
|
'id' => $this->id,
|
|
'nombre' => $this->nombre,
|
|
'correo' => $this->correo,
|
|
'telefono' => $this->telefono,
|
|
'direccion' => $this->direccion,
|
|
'tipo_documento' => $this->tipo_documento,
|
|
'numero_documento' => $this->numero_documento,
|
|
];
|
|
}
|
|
}
|