Laravel 5 + PostgreSQL: "Database [postgres] not configured." Error Laravel 5 + PostgreSQL: "Database [postgres] not configured." Error laravel laravel

Laravel 5 + PostgreSQL: "Database [postgres] not configured." Error


You have to enter your configuration in the .env file.

The configuration you made will only be loaded if they are not already defined in .env

You need to use pgsql instead of postgres.

DB_CONNECTION=pgsqlDB_HOST=localhostDB_DATABASE=DB_NAMEDB_USERNAME=USERDB_PASSWORD=PW 


Laravel sometimes caches your configurations. If you run into this problem while everything looks alright try running

php artisan config:cache