Laravel 5 + PostgreSQL: "Database [postgres] not configured." Error
<p>I'm trying to get started with Laravel + PostgreSQL and been following the <a href="https://laravel.com/docs/5.1/database" rel="noreferrer">database tutorial</a>.</p>

<p>Unfortunately, after updating the database configuration file and running <code>php artisan migrate</code>, the following error appears:</p>

<pre><code>  [InvalidArgumentException]
  Database [postgres] not configured.
</code></pre>

<p>What puzzles me is that I didn't specify the "postgres" database in the configuration, but another database I set through cPanel, say "example_database".</p>

<hr>

<p>Here's some relevant parts of my <code>/config/database.php</code> configuration:</p>

<pre><code>'default' =&gt; env('DB_CONNECTION', 'postgres')
</code></pre>

<p>And inside the <code>connections</code> array of the same file:</p>

<pre><code>'pgsql' =&gt; [
        'driver'   =&gt; 'pgsql',
        'host'     =&gt; env('DB_HOST', 'localhost'),
        'database' =&gt; env('DB_DATABASE', 'example_database'), // This seems to be ignored
        'username' =&gt; env('DB_USERNAME', 'example_username'),
        'password' =&gt; env('DB_PASSWORD', 'example_password'),
        'charset'  =&gt; 'utf8',
        'prefix'   =&gt; '',
        'schema'   =&gt; 'public'
    ],
</code></pre>

<p>The actual database credentials I'm using are working perfectly on my SQL Workbench client, so this seems to be a Laravel config problem. Any ideas? I have searched around for at least an hour to no avail.</p>