<?php

use CodeIgniter\Router\RouteCollection;

/**
 * @var RouteCollection $routes
 */


$routes->group('admin',['filter'=>'validarFilter'], function($routes){


    $routes->group('usuarios', function($routes) {
        
        $routes->get('', 'Usuario::index');  
        $routes->get('crear', 'Usuario::index');       
        $routes->post('registrar', 'Usuario::registrar');
    });

});


    $routes->group('busqueda',['filter'=>'validarFilter'], function($routes) {
        $routes->get('', 'Home::busqueda');
    });

    $routes->group('registro',['filter'=>'validarFilter'], function($routes) {
        $routes->get('/', 'Home::registro');
        $routes->get('consultadni', 'ConsultaDni::buscar');       
        $routes->post('registrarconsulta', 'Registro::registrar');
    });


$routes->group('', function($routes) {
$routes->get('/', 'Home::index');  
$routes->get('login', 'Home::login');
$routes->post('validarlogin', 'Usuario::valida');
$routes->get('salir', 'Home::logout');

});



