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

Multiple Modules with some shared controllers and models

Hi, I have two modules "foo" and "bar" for two different sites. These modules will have shared controllers (BaseControllers, StoryController, etc). They may have their own controllers also. The sites will load via foo.example.com and bar.example.com.

Their layouts, views, scripts, css etc will be completely different for most practical purposes.

I looked at the MVC project on github and noticed there isn't anything with shared controllers. What's would be the recommended approach here?



9.1k

As an aside, this is a fairly common deployment scenario within WordPress (called WordPress MU) where multiple sites share a single application (and shared plugins plus their own optional plugins)