In Index i had define:
<?php ......
$di->setShared('router', function() {
$router = new \Phalcon\Mvc\Router();
$router->add('/:module/:controller/:action/:params', [
'module' => 1,
'controller' => 2,
'action' => 3,
'params' => 4,
]);
$router->setDefaultAction('index');
return $router;
});
..............
$application = new \Phalcon\Mvc\Application($di);
$application->registerModules([
'frontend' => ['path' => APPLICATION_ROOT . '/application/modules/frontend/Module.php'],
'admin' => ['path' => APPLICATION_ROOT . '/application/modules/admin/Module.php'],
'task' => ['path' => APPLICATION_ROOT . '/application/modules/task/Module.php'],
'tmp' => ['path' => APPLICATION_ROOT . '/application/modules/tmp/Module.php'],
'api' => ['path' => APPLICATION_ROOT . '/application/modules/api/Module.php'],
]);
$application->useImplicitView(true);
$application->setDefaultModule("frontend");
.....
when i visit https://xxx.com/frontend/passport/index ,it's work good, but when visit https://xxx.com/frontend/passport/ ,It's say:
Modules\Frontend\Controllers\FrontendController handler class cannot be loaded