Hi, I'm starting to set custom routes and works but I still can access through the controller name. I wish I could only access through the paths defined in the routing files. Sorry for my English
this is my file services.php
/**
* Services are globally registered in this file
*
* @var \Phalcon\Config $config
*/
use Phalcon\Di\FactoryDefault;
use Phalcon\Mvc\View;
use Phalcon\Mvc\Url as UrlResolver;
use Phalcon\Db\Adapter\Pdo\Mysql as DbAdapter;
use Phalcon\Mvc\View\Engine\Volt as VoltEngine;
use Phalcon\Mvc\Model\Metadata\Memory as MetaDataAdapter;
use Phalcon\Session\Adapter\Files as SessionAdapter;
use Phalcon\Security;
use Phalcon\Mvc\Router as router;
$di = new FactoryDefault();
......
$di->set(
'router',
function () {
$router = new Router();
require __DIR__.'/routes.php';
return $router;
}
);
And this my file routes.php
//ruta para login de usuarios
$router->add("/login","login::index");
/*
*rutas para catalogo asignaciones
*/
$router->add("/asignacionesss", "asignaciones::index");