title: Multi-database design application using Laravel 5.3 and Codeigniter
body: <p>Friends, I am building a service application and would like to see a gross suggestion to achieve.</p>
  
  <p>The core of the application is to manage research projects, hence it will have a group of users, who belong to an organization, who login and manage their own projects. Many organizations carry out such projects, which are identical in nature. The project management has identical database tables and schema (across institutions). I have designed a plan as follows:</p>
  
  <ol>
  <li><p>Database-1: A common database users table (all institutions together) get authenticated by querying this table. This table has a institutional code corresponding to each user as a column. </p></li>
  <li><p>Database-2 (institutional code as its name): Based on the institutional code, all the project management is done by connecting to this database. Within this database tables will be present. </p></li>
  </ol>
  
  <p>....</p>
  
  <ol start="3">
  <li>Database-x (institutional code as its name).....</li>
  </ol>
  
  <p>All databases will have identical schema and identical user interface. Institute wise management is easy this way.</p>
  
  <p>Now, using Laravel, i know i can connect to multiple databases. I have done this in codeigniter 3 but trying to migrate to Laravel 5.3 as models architecture is different between Codeigniter 3 and Laravel 5.3. </p>
  
  <p>Any better suggestions. I know my query is not a pure question but this question is about implementation of a many to many relation.</p>