Let's say I created the NewsBundle news portal with articles, tags, events, lots of relationships, quite large and complex.
Now I want to copy this many times and create a news news portal, news news portal, dog news portal, etc., each of which is available, although it is its own domain. Portals differ only in templates , translations and assets . Since I want to implement complex reporting, I want all the data in one database to be marked with all objects with the corresponding portal.
My question is: how do I organize the code?
At first I realized that I could use routing for the same application, but different packages for each domain .
Then I found out that I can expand my main package . But it looks like this only works once.
How did I do all the routing with annotations, it looks like this doesn't work to inherit routes from the master?
One of the most difficult questions is to install a portal switch. Somewhere I need to set a variable that tells whether it is a fashion or dog portal, so I can filter the content in all repositories accordingly.
I did this in app.php, which is by far the worst practice.
In the end, I want you to be able to easily deploy new portals without duplicating code.
Any ideas are greatly appreciated.
,