Hi to everyone.
Let me try to explain my problem.
I´m using multiple databases in a project. One database that store all the users, and shared info like states and cities. And one database for each user, based on their id. Let´s use the config below:
DB1 Provider name: db Database name: app Table 1: States - [id, name] Table 2: Cities - [id, state_id, name]
DB2 Provider name: dbclient Database name: c1 (user id 1) Table 1: Clients - [id, city_id, name]
When i try to create a pagination with querybuilder below:
$builder = $this ->modelsManager ->createBuilder() ->from(Clients::class) ->innerJoin(Cities::class) ->where( "App\Models\Clients.name like '%" . $name . "%'" );
I´m getting this error: "SQLSTATE[42S02]: Base table or view not found: 1146 Table 'c1.cities' doesn't exist"
Is there some way to create a Join between these two databases?