title: Laravel 5 Homestead Multiple Databases
body: <p>I have two separate Laravel Homestead projects called "Laravel" and "authapp". I would like each of these projects to have their own database. </p>
  
  <p>I have set up my Homestead.yaml file to create one database for each project. And it does just that. However, when I am in my "authapp" project and run the migrate command, it insists on writing to the database specified for the "Laravel" project (the "homestead" database).</p>
  
  <p>Here is my Homestead.yaml file:</p>
  
  <pre><code>provider: virtualbox
  
  authorize: ~/.ssh/id_rsa.pub
  
  keys:
      - ~/.ssh/id_rsa
  
  folders:
      - map: ~/Code/Laravel
        to: /home/vagrant/Code/Laravel
      - map: ~/Code/authapp
        to: /home/vagrant/Code/authapp
  
  sites:
      - map: homestead.app
        to: /home/vagrant/Code/Laravel/public
      - map: authapp.app
        to: /home/vagrant/Code/authapp/public
  
  databases:
      - homestead
      - authapp
  </code></pre>
  
  <p>And my database.php file for the "Laravel" project.</p>
  
  <pre><code>'mysql' =&gt; [
          'driver' =&gt; 'mysql',
          'host' =&gt; env('DB_HOST', 'localhost'),
          'port' =&gt; env('DB_PORT', '3306'),
          'database' =&gt; env('DB_DATABASE', 'homestead'),
          'username' =&gt; env('DB_USERNAME', 'homestead'),
          'password' =&gt; env('DB_PASSWORD', 'secret'),
          'charset' =&gt; 'utf8',
          'collation' =&gt; 'utf8_unicode_ci',
          'prefix' =&gt; '',
          'strict' =&gt; true,
          'engine' =&gt; null,
      ],
  </code></pre>
  
  <p>And my database.php file for the "authapp" project.</p>
  
  <pre><code>'mysql' =&gt; [
          'driver' =&gt; 'mysql',
          'host' =&gt; env('DB_HOST', 'localhost'),
          'port' =&gt; env('DB_PORT', '3306'),
          'database' =&gt; env('DB_DATABASE', 'authapp'),
          'username' =&gt; env('DB_USERNAME', 'homestead'),
          'password' =&gt; env('DB_PASSWORD', 'secret'),
          'charset' =&gt; 'utf8',
          'collation' =&gt; 'utf8_unicode_ci',
          'prefix' =&gt; '',
          'strict' =&gt; true,
          'engine' =&gt; null,
      ],
  </code></pre>
  
  <p>I have run vagrant provision a bunch of times and that doesn't do the trick. </p>