diff --git a/routes/api.php b/routes/api.php index fdc813e..d756aad 100644 --- a/routes/api.php +++ b/routes/api.php @@ -1,5 +1,7 @@ group(function () { $atributos_a_ocultar = ['telefono', 'cantidad_de_nucleos', 'correo', 'referente_finanzas', 'created_at', 'updated_at']; return GrupoDeCompra::all()->makeHidden($atributos_a_ocultar)->sortBy('nombre')->groupBy('region'); }); + Route::get('/{gdc}/bonos-de-transporte', function($gdc) { + $grupo = GrupoDeCompra::where('id',$gdc)->first(); + return ['bdt' => $grupo->calcularCantidadBDT()]; + }); }); Route::prefix('pedidos')->group(function () {