From 12edccba0cb61929e149ab95072c92fb3b795489 Mon Sep 17 00:00:00 2001 From: Reinaldo Araujo Barreto Junior Date: Wed, 6 Jul 2022 19:54:54 -0300 Subject: [PATCH] :hammer: APP #270 corrigindo exemplo --- appexemplo_v2.0/api/routes2.php | 45 +++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/appexemplo_v2.0/api/routes2.php b/appexemplo_v2.0/api/routes2.php index 3027b5d0..0f53b820 100644 --- a/appexemplo_v2.0/api/routes2.php +++ b/appexemplo_v2.0/api/routes2.php @@ -1,9 +1,38 @@ getIdentifier(); $routeArray['name']= $route->getName(); + $routeArray['methods']= $route->getMethods()[0]; $routeArray['url'] = $url.$route->getPattern(); $routesArray[] = $routeArray; } @@ -63,5 +93,20 @@ $app->get($urlChamada.'sysinfo', SysinfoAPI::class . ':getInfo'); + +//-------------------------------------------------------------------- +// TABLE: meta_tipo +//-------------------------------------------------------------------- +$urlGrupo = $urlChamada.'meta_tipo'; +$app->group($urlGrupo, function(RouteCollectorProxy $group) use ($app,$urlGrupo) { + $app->get($urlGrupo, Meta_tipoAPI::class . ':selectAll'); + $app->get($urlGrupo.'/{id:[0-9]+}', Meta_tipoAPI::class . ':selectById'); + + $app->post($urlGrupo, Meta_tipoAPI::class . ':save'); + $app->put($urlGrupo.'/{id:[0-9]+}', Meta_tipoAPI::class . ':save'); + $app->delete($urlGrupo.'/{id:[0-9]+}', Meta_tipoAPI::class . ':delete'); +}); + + // Run app $app->run(); \ No newline at end of file