title: Artisan migrate fails in development environment because of missing environment variable in production config
body: <p>I have two database configs, one for production and one for development:</p>
  
  <pre><code>// app/config/database.php
  'connections' =&gt; array(
      'mysql' =&gt; array(
          'driver'    =&gt; 'mysql',
          'host'      =&gt; $_SERVER['RDS_HOSTNAME'],
          'database'  =&gt; $_SERVER['RDS_DB_NAME'],
          'username'  =&gt; $_SERVER['RDS_USERNAME'],
          'password'  =&gt; $_SERVER['RDS_PASSWORD'],
          'charset'   =&gt; 'utf8',
          'collation' =&gt; 'utf8_unicode_ci',
          'prefix'    =&gt; '',
      )
  )
  
  // app/config/development/database.php
  'connections' =&gt; array(
      'mysql' =&gt; array(
          'driver'    =&gt; 'mysql',
          'host'      =&gt; $_SERVER['MYSQL_PORT_3306_TCP_ADDR'],
          'database'  =&gt; $_SERVER['MYSQL_ENV_MYSQL_DATABASE'],
          'username'  =&gt; $_SERVER['MYSQL_ENV_MYSQL_USER'],
          'password'  =&gt; $_SERVER['MYSQL_ENV_MYSQL_PASSWORD'],
          'charset'   =&gt; 'utf8',
          'collation' =&gt; 'utf8_unicode_ci',
          'prefix'    =&gt; '',
      )
  )
  </code></pre>
  
  <p>The relevant database environment variables exist (the ones beginning with <code>MYSQL_</code>), and when running the migrate command:</p>
  
  <pre><code>php artisan migrate --env=development
  </code></pre>
  
  <p>the following exception gets thrown:</p>
  
  <pre><code>{
      "error":{
          "type":"ErrorException",
          "message":"Undefined index: RDS_HOSTNAME",
          "file":"/var/www/app/config/database.php",
          "line":50
      }
  }
  </code></pre>
  
  <p>Why does Laravel care if the environment variable in my production config doesn't exist when I don't even want to use the production configuration? How do I get around this?</p>