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

Two projects into one catalog without defining routes

Hi, Is there a way to put two projects into one catalog and do not define any routes? I have application and api as an independend applications but I thought that it will be nicer if I will have it in one catalog.

So for now I have my main with two projects into it. While localhost/main/app1 works fine localhost/main/api have problems with loading its model. i tried to add namespace but something is still not working.

$loader->registerNamespaces(
    array(
        'Owedding\Api\Models'    => "./models/",
    )
);

I also tried to debug the path with var dumps and it looks ok.

Have you investigated the examples here?

https://github.com/phalcon/mvc/tree/master/multiple/apps

I actually prefer your original implementation. If you have code that the two apps share there are better ways to solve it then to shove it into one app. Monolithic apps tends to increase complexity more than a service oriented architecture.