title: How to execute Join queries between multiple Databases that are on different server with Laravel Eloquent?
body: <p>This is how we handle multiple DB Connections with Laravel, which is a <strong>PHP Framework</strong> not <strong>Python</strong> (For whom thinks that this is a duplicate post)</p>
  
  <pre><code>&lt;?php
  return array(
  
      'default' =&gt; 'mysql',
  
      'connections' =&gt; array(
  
          # Our primary database connection
          'mysql' =&gt; array(
              'driver'    =&gt; 'mysql',
              'host'      =&gt; 'host1',
              'database'  =&gt; 'database1',
              'username'  =&gt; 'user1',
              'password'  =&gt; 'pass1'
              'charset'   =&gt; 'utf8',
              'collation' =&gt; 'utf8_unicode_ci',
              'prefix'    =&gt; '',
          ),
  
          # Our secondary database connection
          'mysql2' =&gt; array(
              'driver'    =&gt; 'mysql',
              'host'      =&gt; 'host2',
              'database'  =&gt; 'database2',
              'username'  =&gt; 'user2',
              'password'  =&gt; 'pass2'
              'charset'   =&gt; 'utf8',
              'collation' =&gt; 'utf8_unicode_ci',
              'prefix'    =&gt; '',
          ),
      ),
  );
  </code></pre>
  
  <p>And this is how you connect to this database.</p>
  
  <pre><code>$user1 = User::on('mysql1')-&gt;where(/* ... */)-&gt;get()
  $user2 = User::on('mysql2')-&gt;where(/* ... */)-&gt;get()
  </code></pre>
  
  <p>These are only SELECT queries. Therefore Eloquent works flawlessly.</p>
  
  <p>However, when I want to execute a <strong>JOIN query</strong> operation between these 2 databases, this seems not possible.</p>