title: Laravel won't reload .env file on MAMP
body: <p>I recently switched from using the built-in Apache2, and PHP installation on Mac, and changed to the newest version of MAMP (3.5) and moved all of my projects into the htdocs folder. Everything works fine except for my Laravel projects after I update to the new MySQL info. When trying to access anything that uses the MySQL, I get this error</p>
  
  <p><code>PDOException in Connector.php line 55: SQLSTATE[HY000] [1045] Access denied for user 'cumc'@'localhost' (using password: YES)</code></p>
  
  <p>The new .env file looks like this in the database information.</p>
  
  <pre><code>DB_CONNECTION=mysql
  DB_HOST=127.0.0.1
  DB_PORT=3306
  DB_DATABASE=cumc
  DB_USERNAME=root
  DB_PASSWORD=root
  </code></pre>
  
  <p>So by the error, it looks like something is getting cached, but I've run every cache:clear command I could find, restart MAMP, my Mac, and tried everything I can think of. Even changing the <code>app/database.php</code> with the new details, and changing the name of <code>.env</code> so it wouldn't load, and it still shows the error.</p>
  
  <p>Here's the <code>config/database.php</code> file</p>
  
  <pre><code>&lt;?php
  
  return [
  
      /*
      |--------------------------------------------------------------------------
      | PDO Fetch Style
      |--------------------------------------------------------------------------
      |
      | By default, database results will be returned as instances of the PHP
      | stdClass object; however, you may desire to retrieve records in an
      | array format for simplicity. Here you can tweak the fetch style.
      |
      */
  
      'fetch' =&gt; PDO::FETCH_CLASS,
  
      /*
      |--------------------------------------------------------------------------
      | Default Database Connection Name
      |--------------------------------------------------------------------------
      |
      | Here you may specify which of the database connections below you wish
      | to use as your default connection for all database work. Of course
      | you may use many connections at once using the Database library.
      |
      */
  
      'default' =&gt; env('DB_CONNECTION', 'mysql'),
  
      /*
      |--------------------------------------------------------------------------
      | Database Connections
      |--------------------------------------------------------------------------
      |
      | Here are each of the database connections setup for your application.
      | Of course, examples of configuring each database platform that is
      | supported by Laravel is shown below to make development simple.
      |
      |
      | All database work in Laravel is done through the PHP PDO facilities
      | so make sure you have the driver for your particular database of
      | choice installed on your machine before you begin development.
      |
      */
  
      'connections' =&gt; [
  
          'sqlite' =&gt; [
              'driver' =&gt; 'sqlite',
              'database' =&gt; env('DB_DATABASE', database_path('database.sqlite')),
              'prefix' =&gt; '',
          ],
  
          'mysql' =&gt; [
              'driver' =&gt; 'mysql',
              'host' =&gt; env('DB_HOST', 'localhost'),
              'port' =&gt; env('DB_PORT', '3306'),
              'database' =&gt; env('DB_DATABASE', 'forge'),
              'username' =&gt; env('DB_USERNAME', 'forge'),
              'password' =&gt; env('DB_PASSWORD', ''),
              'charset' =&gt; 'utf8',
              'collation' =&gt; 'utf8_unicode_ci',
              'prefix' =&gt; '',
              'strict' =&gt; false,
              'engine' =&gt; null,
          ],
  
          'pgsql' =&gt; [
              'driver' =&gt; 'pgsql',
              'host' =&gt; env('DB_HOST', 'localhost'),
              'port' =&gt; env('DB_PORT', '5432'),
              'database' =&gt; env('DB_DATABASE', 'forge'),
              'username' =&gt; env('DB_USERNAME', 'forge'),
              'password' =&gt; env('DB_PASSWORD', ''),
              'charset' =&gt; 'utf8',
              'prefix' =&gt; '',
              'schema' =&gt; 'public',
          ],
  
      ],
  
      /*
      |--------------------------------------------------------------------------
      | Migration Repository Table
      |--------------------------------------------------------------------------
      |
      | This table keeps track of all the migrations that have already run for
      | your application. Using this information, we can determine which of
      | the migrations on disk haven't actually been run in the database.
      |
      */
  
      'migrations' =&gt; 'migrations',
  
      /*
      |--------------------------------------------------------------------------
      | Redis Databases
      |--------------------------------------------------------------------------
      |
      | Redis is an open source, fast, and advanced key-value store that also
      | provides a richer set of commands than typical key-value systems
      | such as APC or Memcached. Laravel makes it easy to dig right in.
      |
      */
  
      'redis' =&gt; [
  
          'cluster' =&gt; false,
  
          'default' =&gt; [
              'host' =&gt; env('REDIS_HOST', 'localhost'),
              'password' =&gt; env('REDIS_PASSWORD', null),
              'port' =&gt; env('REDIS_PORT', 6379),
              'database' =&gt; 0,
          ],
  
      ],
  
  ];
  </code></pre>