title: SAAS - Laravel - Multi tenancy - switch database
body: <p>I'm going to start a <code>SAAS</code> model web application and gone through many searches. </p>
  
  <p>My idea is separate database for each tenant and single code base and each client will have sub domain.</p>
  
  <p>I'm storing tenant details in main database. </p>
  
  <p>Customers will logged in through their sub domain. Now i want to verify <code>tenant details</code>(which is stored in main database), then authenticate tenants account and after logged in, i want to show tenant specific data(stored in separate database) from tenant database.</p>
  
  <p>how can I switch database after verify tenant details from main database to tenant database in <code>laravel 4</code>? I'm not clear on this. please give your suggestion?</p>