sakir
sakir

Reputation: 21

Multiple apps with Laravel

I've 3 projects and the mostly need the same models, and the data. So I'm thinking to create a Core app that have Core models(User, Store, etc.). And create different apps for each project. Besides they use the core models, they can have their own models. So what's the best way to do this?

Upvotes: 0

Views: 938

Answers (1)

David Barker
David Barker

Reputation: 14620

I left this as a comment but it is a potential answer to this question.

Original comment

You might want to look into an HMVC package for Laravel. The only decent use case for it is multi sites using the same core code. This would let you have multiple sites with a core code base using internal cross controller requests from the site controllers to the core code

HMVC or Heirarchical Model View Controller, as a concept extends the MVC pattern and allows developers to make cross controller/route requests. In theory this would allow for x number of sub installations of Laravel (using a package like this) to call a single common ancestor application that would provide them with an API for dealing with specific requests.

This is good as it provides separation of the api/master app and its child application instances, leaving them free to implement their own logic.

I think this may be something that would help you in this instance (and isn't difficult to use).

Upvotes: 1

Related Questions