title: laravel how to use query builder DB::table(..) with DB::connection()
body: <p>I have 2 databases defined in config/databases, mysql and mysql2<br>
  The default connection is mysql</p>
  
  <p>I need to get this data from mysql2  </p>
  
  <pre><code>$programs=DB::table('node')-&gt;where('type', 'Programs')-&gt;get();
  </code></pre>
  
  <p>The docs tell me I can change the connection using</p>
  
  <pre><code>$programs=DB::connection('mysql2')-&gt;select(...)
  </code></pre>
  
  <p>which would let me run a sql statement to get an array for $programs. 
  But I am wondering if there is a way to combine the 2 statements i.e. use query builder on specific db::connection.</p>