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

HMVC architecture using Phalcon

Hi, I would like to ask if it is possible to use an HMVC architecture in Phalcon that is similar to HMVC in CodeIgniter (using https://bitbucket.org/wiredesignz/codeigniter-modular-extensions-hmvc ) instead of the standard MVC architecture that comes with Phalcon.

I mean, if something like this is possible in Phalcon:

modules/
       /posts
           /controllers
                 admin.php
                 posts.php
           /modules
                 posts.php
           /views
                 /admin
                      posts_add.php
                      posts_edit.php
                      posts_list.php
                 posts_detail.php
                 posts_list.php
        /poll
           /controllers
                 admin.php
                 poll.php
           /modules
                 poll.php
           /views
                 /admin
                      poll_add.php
                      poll_edit.php
                      poll_list.php
                 poll_detail.php
                 poll_list.php

Is something like that possiblle to achieve in Phalcon?

If it is, how could I do that? Is any tutorial around?

Phalcon can work as full-stack framework, thus you are not limited to the official approach but go with the solution that works best for your project.

See PhalconEye CMS - it's using HMVC approach (in some sort) and might give you and idea. https://github.com/lantian/PhalconEye/tree/master/app/modules