We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

Phalcon2 module app routing

just installed Phalcon2 and working around multi-module app.

I've have such structure.

I've have such structure.

And my index file https://pastebin.com/zqaRKCdC

When navigating to / , see the front-module index controller, but if I go to /admin, see the same. Maybe anyone have an idea what I'm missing?

P.S One of Module.php - https://pastebin.com/CpGDSuyE

Try to change line 15 from your index file

$di->set('router', function () {

Instead of:

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

https://docs.phalcon.io/en/latest/reference/applications.html#multi-module