Piotr Musiał
Piotr Musiał

Reputation: 23

Two frontend and one backend in one app Yii Framework 2

I'm working with Yii Framework 2. How can I create an app with one backend and two front ends?

For example:

All apps should have a common db, models and 3 different layouts. I found a Yii2 advanced template where are only two: frontend and backend.

Upvotes: 2

Views: 837

Answers (1)

Salem Ouerdani
Salem Ouerdani

Reputation: 7886

You can build as many fronts as you need by adding them as independent modules. Each within a separate folder, with its own configs and own controllers. Then they may all share the same models.

You may check Module docs for more details or you may also check this example which is built for REST on top of a basic template, so you'll need different apache and app configs but it is practically the same.

Upvotes: 1

Related Questions