Zona admin
This commit is contained in:
16
resources/routes/web/admin.php
Normal file
16
resources/routes/web/admin.php
Normal file
@ -0,0 +1,16 @@
|
||||
<?php
|
||||
$app->group('/admin', function($app) {
|
||||
$folder = implode(DIRECTORY_SEPARATOR, [
|
||||
__DIR__,
|
||||
'admin'
|
||||
]);
|
||||
if (file_exists($folder)) {
|
||||
$files = new DirectoryIterator($folder);
|
||||
foreach ($files as $file) {
|
||||
if ($file->isDir()) {
|
||||
continue;
|
||||
}
|
||||
include_once $file->getRealPath();
|
||||
}
|
||||
}
|
||||
});
|
8
resources/routes/web/admin/faqs.php
Normal file
8
resources/routes/web/admin/faqs.php
Normal file
@ -0,0 +1,8 @@
|
||||
<?php
|
||||
use ProVM\KI\Common\Controller\Web\Admin\Faq;
|
||||
|
||||
$app->group('/faqs', function($app) {
|
||||
$app->post('/add', [Faq::class, 'add']);
|
||||
$app->post('/delete', [Faq::class, 'delete']);
|
||||
$app->get('[/]', Faq::class);
|
||||
});
|
13
resources/routes/web/admin/home.php
Normal file
13
resources/routes/web/admin/home.php
Normal file
@ -0,0 +1,13 @@
|
||||
<?php
|
||||
use ProVM\KI\Common\Controller\Web\Admin\Home;
|
||||
|
||||
$app->group('/home', function($app) {
|
||||
$app->group('/avisos', function($app) {
|
||||
$app->post('/add', [Home::class, 'add']);
|
||||
$app->post('/delete', [Home::class, 'delete']);
|
||||
});
|
||||
$app->group('/resumen', function($app) {
|
||||
$app->post('/edit', [Home::class, 'edit']);
|
||||
});
|
||||
$app->get('[/]', Home::class);
|
||||
});
|
7
resources/routes/web/admin/nosotros.php
Normal file
7
resources/routes/web/admin/nosotros.php
Normal file
@ -0,0 +1,7 @@
|
||||
<?php
|
||||
use ProVM\KI\Common\Controller\Web\Admin\Nosotros;
|
||||
|
||||
$app->group('/nosotros', function($app) {
|
||||
$app->post('[/]', [Nosotros::class, 'guardar']);
|
||||
$app->get('[/]', Nosotros::class);
|
||||
});
|
24
resources/routes/web/admin/productos.php
Normal file
24
resources/routes/web/admin/productos.php
Normal file
@ -0,0 +1,24 @@
|
||||
<?php
|
||||
use ProVM\KI\Common\Controller\Web\Admin\Productos;
|
||||
|
||||
$app->group('/productos', function($app) {
|
||||
$app->group('/add', function($app) {
|
||||
$app->get('[/]', [Productos::class, 'add']);
|
||||
$app->post('[/]', [Productos::class, 'do_add']);
|
||||
});
|
||||
$app->get('[/]', Productos::class);
|
||||
});
|
||||
$app->group('/producto/{producto}', function($app) {
|
||||
$app->group('/imagen', function($app) {
|
||||
$app->post('/delete', [Productos::class, 'delete_image']);
|
||||
});
|
||||
$app->group('/imagenes', function($app) {
|
||||
$app->post('/add', [Productos::class, 'add_image']);
|
||||
});
|
||||
$app->group('/video', function($app) {
|
||||
$app->post('/set', [Productos::class, 'set_video']);
|
||||
$app->post('/delete', [Productos::class, 'delete_video']);
|
||||
});
|
||||
$app->post('[/]', [Productos::class, 'do_edit']);
|
||||
$app->get('[/]', [Productos::class, 'edit']);
|
||||
});
|
Reference in New Issue
Block a user