<?php

use CodeIgniter\Router\RouteCollection;

/**
 * @var RouteCollection $routes
 */
$routes->setAutoRoute('improved');

$routes->get('/', 'Admin\Login::getIndex');

$routes->get('admin/logout', 'Admin\Login::getLogout');


$routes->group('admin', ['filter' => 'noadmin'], static function ($routes) {
    $routes->get('', 'Admin\Login::getIndex');
    $routes->get('login', 'Admin\Login::getIndex');
    $routes->post('login', 'Admin\Login::postLogin');
    $routes->get('logout', 'Admin\Login::getLogout');
});
