Answer the question
In order to leave comments, you need to log in
How to make an admin panel for a car wash with multiple addresses?
Good day.
There is a small admin panel for a car wash made on Yii2 and there was only one car wash. Now there is another one at a different address. The question is how to correctly add a second point to the admin panel? She herself was not originally planned for several points. The admin module acts as the admin part. There are no bindings to the address, since there was only one car wash.
Create a new module and copy everything there? To be honest, I don’t know ... then, when changing, it will be necessary to correct in two places.
And what about the database? Let's admit there are records on a sink in basis. Write them into one table from two points and separate by flag, or is it better to create another table for another point?
I understand without seeing the structure of the application it is difficult to advise something specifically for me. I would just like to know in general terms how such admin panels are implemented for two addresses?
Answer the question
In order to leave comments, you need to log in
A third sink may also appear, I would enter the sinks into a separate table, distinguish them by id, and refer to them from other tables by a foreign key.
Here you need to understand the problem right away. If this is just a mirror, then there are no problems at all, just a new domain is configured on a common entry point.
If the data on the two sites will be different, then everything is much more complicated. It is necessary either to completely create a clone and then, in case of edits, change the scripts in two places. Or in the existing admin panel, each script must understand that it can work with more than one car wash. This is a more correct approach, but almost every script will have to be rewritten. But if there is a third, fourth car wash, then it will be much easier.
Cloning is easier initially, but then there can be a lot of problems. I had such a project, eventually 13 copies were created with 13 separate databases. I am wary of this approach.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question