title: Multiple DB Connections in Eloquent with slim
body: <p>I try to add more DB connections to my Eloquent in my Slim framework application.</p>
  
  <p>And I do this:</p>
  
  <pre><code>$app = new \Slim\App([
      'db' =&gt; [
          'driver'    =&gt; 'mysql',
          'host'      =&gt; 'localhost',
          'database'  =&gt; 'products',
          'username'  =&gt; 'user',
          'password'  =&gt; 'pass',
          'charset'   =&gt; 'utf8',
          'collation' =&gt; 'utf8_unicode_ci',
          'prefix'    =&gt; '',
      ],
      'db_second' =&gt; [
          'driver'    =&gt; 'mysql',
          'host'      =&gt; 'localhost',
          'database'  =&gt; 'second',
          'username'  =&gt; 'user',
          'password'  =&gt; 'pass',
          'charset'   =&gt; 'utf8',
          'collation' =&gt; 'utf8_unicode_ci',
          'prefix'    =&gt; '',
      ],
  ]);
  
  $container = $app-&gt;getContainer();
  
  // connect to db with Illuminate larvel
  $capsule = new \Illuminate\Database\Capsule\Manager;
  $capsule-&gt;addConnection($container['settings']['db']);
  $capsule-&gt;setAsGlobal();
  $capsule-&gt;bootEloquent();
  /// END connect to db
  
  // to accsess the $capsule with our container from our controllers
  $container['db'] = function($container) use ($capsule){
      return $capsule;
  };
  </code></pre>
  
  <p>Now I don't know how to add another connection the <code>db_second</code> configuration that I have in the settings.</p>
  
  <p>And how should I use this connection in the model?</p>