title: Laravel: connect to databases dynamically
body: <p>I'm creating an application in Laravel 5(.1) where it is needed to connect to different databases. The only problem is that it's not known which databases it has to connect to, so making use of the database.php in config is not possible. A controller is in charge of making a connection with dynamically given connection details.</p>
  
  <p>How can I make a new connection to a database, including making use of the DB class? (Or is this possible)</p>
  
  <p>Thanks in advance!</p>