Files
oficial/app/resources/routes/04_ventas.php
Juan Pablo Vial fa15da1ee2 Ventas
2023-09-07 23:03:21 -03:00

28 lines
948 B
PHP

<?php
use Incoviba\Controller\Ventas;
$app->group('/ventas', function($app) {
$files = new FilesystemIterator(implode(DIRECTORY_SEPARATOR, [__DIR__, 'ventas']));
foreach ($files as $file) {
if ($file->isDir()) {
continue;
}
include_once $file->getRealPath();
}
$app->get('/add', [Ventas::class, 'add']);
$app->get('[/]', Ventas::class);
});
$app->group('/venta/{proyecto_nombre:[A-za-zÑñ\+\ %0-9]+}/{unidad_descripcion:[0-9]+}', function($app) {
$app->get('[/]', [Ventas::class, 'showUnidad']);
});
$app->group('/venta/{venta_id:[0-9]+}', function($app) {
$app->group('/propietario', function($app) {
$app->get('[/]', [Ventas::class, 'propietario']);
});
$app->group('/propiedad', function($app) {
$app->get('[/]', [Ventas::class, 'propiedad']);
});
$app->get('/edit[/]', [Ventas::class, 'edit']);
$app->get('[/]', [Ventas::class, 'show']);
});