-
I am trying to use the package with related tables from 2 databases, but it fails. Digging into the query I realize that the databases names are not added. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
Hi @powlam, |
Beta Was this translation helpful? Give feedback.
-
I've found a way... The model of the external table must be defined in a different way: adding the database name to the $table instead of changing the $connection.
This way the database name is added to all the queries involving the external table. |
Beta Was this translation helpful? Give feedback.
I've found a way... The model of the external table must be defined in a different way: adding the database name to the $table instead of changing the $connection.
This way the database name is added to all the queries involving the external table.
Credits to https://laracasts.com/discuss/channels/eloquent/how-to-properly-use-2-database-relationships?reply=603694