up
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
<?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,
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user