Controlador y ruta de operadores para API
This commit is contained in:
@ -3,6 +3,13 @@ use Incoviba\Controller\API\Proyectos;
|
||||
|
||||
$app->group('/proyectos', function($app) {
|
||||
$app->get('/escriturando[/]', [Proyectos::class, 'escriturando']);
|
||||
$files = new FilesystemIterator(implode(DIRECTORY_SEPARATOR, [__DIR__, 'proyectos']));
|
||||
foreach ($files as $file) {
|
||||
if ($file->isDir()) {
|
||||
continue;
|
||||
}
|
||||
include_once $file->getRealPath();
|
||||
}
|
||||
$app->get('[/]', [Proyectos::class, 'list']);
|
||||
});
|
||||
$app->group('/proyecto/{proyecto_id}', function($app) {
|
||||
|
12
app/resources/routes/api/proyectos/brokers.php
Normal file
12
app/resources/routes/api/proyectos/brokers.php
Normal file
@ -0,0 +1,12 @@
|
||||
<?php
|
||||
use Incoviba\Controller\API\Proyectos\Brokers;
|
||||
|
||||
$app->group('/brokers', function($app) {
|
||||
$app->post('/add[/]', Brokers::class . ':add');
|
||||
$app->post('/edit[/]', Brokers::class . ':edit');
|
||||
$app->get('[/]', Brokers::class);
|
||||
});
|
||||
$app->group('/broker/{broker_rut}', function($app) {
|
||||
$app->delete('[/]', Brokers::class . ':delete');
|
||||
$app->get('[/]', Brokers::class . ':show');
|
||||
});
|
Reference in New Issue
Block a user