83 lines
2.5 KiB
PHP
83 lines
2.5 KiB
PHP
<?php namespace App\Http\Controllers\Repuve;
|
|
/**
|
|
* @copyright (c) 2025 Notsoweb Software (https://notsoweb.com) - All Rights Reserved
|
|
*/
|
|
|
|
use App\Http\Controllers\Controller;
|
|
use Illuminate\Http\Request;
|
|
use Notsoweb\ApiResponse\Enums\ApiResponse;
|
|
|
|
class RepuveController extends Controller
|
|
{
|
|
/**
|
|
* Obtener información de vehículo (datos hardcodeados)
|
|
*/
|
|
public function information()
|
|
{
|
|
$data = [
|
|
"ANIO_PLACA" => "2020",
|
|
"PLACA" => "WNU700B",
|
|
"NO_SERIE" => "LSGHD52H0ND032457",
|
|
"RFC" => "GME111116GJA",
|
|
"FOLIO" => "3962243",
|
|
"VIGENCIA" => "2025",
|
|
"FECHA_IMPRESION" => "10-01-2025",
|
|
"QR_HASH" => "Vu5TF4kYsbbltzjDdGQyenKfZoIk2wro34a5Gkh9JVh0CFxfPlrd92YEWK21JF.nLjQNyzKmqRvWYuPiS.kU7A--",
|
|
"VALIDO" => true,
|
|
"FOLIOTEMP" => false,
|
|
"NOMBRE" => "GOLSYSTEMS DE MEXICO S DE RL DE CV",
|
|
"NOMBRE2" => "GOLS*MS DXICOE RL*CV",
|
|
"MUNICIPIO" => "CENTRO",
|
|
"LOCALIDAD" => "VILLAHERMOSA",
|
|
"CALLE" => "C BUGAMBILIAS 118 ",
|
|
"CALLE2" => "C BU*ILIA*18 ",
|
|
"TIPO" => "SEDAN",
|
|
"TIPO_SERVICIO" => "PARTICULAR",
|
|
"MARCA" => "CHEVROLET G.M.C.",
|
|
"LINEA" => "AVEO",
|
|
"SUBLINEA" => "PAQ. \"A\" LS",
|
|
"MODELO" => 2022,
|
|
"NUMERO_SERIE" => "LSGHD52H0ND032457",
|
|
"NUMERO_MOTOR" => "H. EN WUHANLL,SGM",
|
|
"DESCRIPCION_ORIGEN" => "IMPORTADO",
|
|
"COLOR" => "BLANCO",
|
|
"CODIGO_POSTAL" => "86179",
|
|
"SERIE_FOLIO" => "D3962243",
|
|
"SFOLIO" => "3962243"
|
|
];
|
|
|
|
return ApiResponse::OK->response($data);
|
|
}
|
|
|
|
public function store(Request $request)
|
|
{
|
|
$data = $request->all();
|
|
$data['ID'] = rand(1000, 9999);
|
|
$data['created_at'] = now()->toDateTimeString();
|
|
|
|
return ApiResponse::OK->response([
|
|
'message' => 'Información almacenada correctamente',
|
|
'data' => $data
|
|
]);
|
|
}
|
|
|
|
public function update(Request $request, $id)
|
|
{
|
|
$data = $this->information();
|
|
$updata['ID'] = $id;
|
|
$updata['updated_at'] = now()->toDateTimeString();
|
|
|
|
return ApiResponse::OK->response([
|
|
'message' => 'Información actualizada correctamente',
|
|
'data' => $updata
|
|
]);
|
|
}
|
|
|
|
public function delete($id)
|
|
{
|
|
return ApiResponse::OK->response([
|
|
'message' => "Información con ID {$id} eliminada correctamente"
|
|
]);
|
|
}
|
|
}
|