group(function () { //Globos Route::get('/globos/activos', [GloboERPController::class, 'getNombresImagenGlobosActivos']); Route::post('/telegram/message', [TelegramController::class, 'sendText']); Route::post('/telegram/photo', [TelegramController::class, 'sendImage']); Route::post('/telegram/audio', [TelegramController::class, 'sendAudioApi']); Route::post('/telegram/video', [TelegramController::class, 'sendVideoApi']); Route::post('/telegram/document', [TelegramController::class, 'sendDocumentApi']); Route::post('/telegram/log', [TelegramController::class, 'sendLog']); Route::post('/telegram/notify', [TelegramController::class, 'notify']); Route::get('/telegram/me', [TelegramController::class, 'botInfo']); Route::get('/telegram/chats', [TelegramController::class, 'getChatId']); // rutas para los vuelos Route::get('/vuelos/precios', [VuelosERPController::class, 'getVuelosNombresPreciosPublico']); Route::get('/vuelos/adicionales', [VuelosERPController::class, 'getServiciosAdicionales']); Route::post('/vuelos/reserva', [VuelosERPController::class, 'reservarVuelo']); Route::post('/vuelos/pago', [VuelosERPController::class, 'efectuarPago']); }); Route::middleware('auth:sanctum')->get('/user', function (Request $request) { return $request->user(); }); Route::get('vuelos', function () { $vuelos = Vuelos::select( 'vuelos.id_vuelo', 'vuelos.nombre_vuelo', 'vuelos.enlace_permanente', 'vuelos.precio_publico', 'vuelos.precio_especial', 'unidades.nombre_unidad' ) ->where([ ['vuelos.id_sitio_web', 2], ['vuelos.visibilidad_pagina_web', 1] ]) ->rightJoin('unidades', 'vuelos.id_unidad', '=', 'unidades.id_unidad') ->orderBy('vuelos.id_vuelo', 'desc') // aquĆ­ el cambio ->get(); return response()->json($vuelos); }); Route::get('reservar', function () { return response()->json([ 'message' => 'Ruta de vuelos' ]); }); Route::get('todos-los-vuelos', [ApiConsultasController::class, 'todosLosVuelos']);