21 lines
618 B
PHP
21 lines
618 B
PHP
<?php
|
|
use Incoviba\Controller\Ventas;
|
|
|
|
$app->group('/ventas', function($app) {
|
|
$folder = implode(DIRECTORY_SEPARATOR, [__DIR__, 'ventas']);
|
|
if (file_exists($folder)) {
|
|
$files = new FilesystemIterator($folder);
|
|
foreach ($files as $file) {
|
|
if ($file->isDir()) {
|
|
continue;
|
|
}
|
|
include_once $file->getRealPath();
|
|
}
|
|
}
|
|
$app->post('[/]', [Ventas::class, 'proyecto']);
|
|
});
|
|
$app->group('/venta/{venta_id}', function($app) {
|
|
$app->get('/comentarios', [Ventas::class, 'comentarios']);
|
|
$app->get('[/]', [Ventas::class, 'get']);
|
|
});
|