Answer the question
In order to leave comments, you need to log in
Working with multiple db yii2?
Hello everyone, help with the solution of the issue (Yii2). There is a project in which you need to build work with several databases (work with the database occurs through the records asset). They can be from 2 to several dozen. The database structure is the same, the tables are the same with the same fields. It is required to make sure that when connecting the next database, data is selected simultaneously from all databases, almost all logic is carried out in the model. Now I have implemented working with two databases, but I had to duplicate the models to select data from a separate database. I registered the connection of databases in the config, created a separate file for each database. But the trend is that if I go this way, my models will be cloned and I have to edit almost all the controllers. Can anyone help, if anyone has any thoughts on this topic?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question