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

Can my application start with SessionController not IndexController?

My application starts with Login page, so i assume i need SessionController more than i need IndexController.

When i rename Index to Session, phalcon is always searching for IndexController and throws an error "IndexController handler class cannot be loaded".

Is there a possibility to avoid having IndexCntroller in the app?



32.2k
Accepted
answer

Yes, you can define your custom routes. Please check:

https://docs.phalcon.io/en/latest/reference/routing.html



14.9k

yes, you are right, i added routes file to config Dir with custom navigation rules, then added it to services and it works! Thnx.