title: Laravel 5 How to configure the Queue database driver to connect to a non-default database?
body: <p>In Laravel 5.1, we can set the Queue connection configurations in <code>config/queue.php</code>.</p>
  
  <pre><code>QUEUE_DRIVER=database
  </code></pre>
  
  <hr>
  
  <pre><code>    'database' =&gt; [
          'driver' =&gt; 'database',
          'table' =&gt; 'jobs',
          'queue' =&gt; 'default',
          'expire' =&gt; 60,
      ],
  </code></pre>
  
  <hr>
  
  <p>However, it will only use the default database connection in <code>config/database.php</code>.</p>
  
  <p>If I have 2 database, 1 default database <code>mysql1</code> in localhost, and 1 database <code>mysql2</code> in a remote server, and the Queue <code>jobs</code> table is in the remote database <code>mysql2</code>, how can I configure the Queue database driver to use the remote <code>mysql2</code> database? Please note that the main App is using the default database in localhost.</p>