Routing not working in Multiple-Factory-Default

I have created yesterday new project with phalcon developer tools with option "multi".

I have got structure like this:


--> Core

--> User

    --> Controller

         --> SecurityController.php

     --> View

         --> Security

              --> login.phtml



In config/services.php I have changed routing to look like:

$di['router'] = function () {

$router = new Router();
$router->add('/login', array(
                            'module' => 'User',
                            'controller' => 'Security',
                            'action' => 'login',
 return $router;


But when I am trying to access, I am getting this error:

SecurityController handler class cannot be loaded

Can someone please let me know what I am doing wrong?


This seems to be working when I will add


But then it doesn't work if I will add e.g.

$router->add('/index', array( 'module' => 'Core', 'controller' => 'Index', 'action' => 'index', ));

so it is working then for just one Module and when I am going to I am getting this exception

TrebionCRM\User\Controller\IndexController handler class cannot be loaded

Why is it trying to load it for User module, not Core module?