Wamp + Laravel 5.1 + Postgresql

0

Has anyone ever set up Laravel 5.1 to run in Wamp using postgresql database?

I have a Laravel installation running on a WAMP server, but when I run the "php artisan migrate" command I get the following error: "[PDOException] could not find driver". All of my Laravel settings are correct, and I already test a connection to check if I have correctly installed postgresql and everything is fine. Below is my settings and tests, if anyone can give me a light I am grateful:

// database.php

'default' => env('DB_CONNECTION', 'pgsql'), ...

'pgsql' => [
        'driver'   => 'pgsql',
        'host'     => env('DB_HOST', 'localhost'),
        'database' => env('DB_DATABASE', 'forge'),
        'username' => env('DB_USERNAME', 'forge'),
        'password' => env('DB_PASSWORD', ''),
        'charset'  => 'utf8',
        'prefix'   => '',
        'schema'   => 'public',
    ],

.env

DB_HOST=localhost
DB_DATABASE=postgres
DB_USERNAME=postgres
DB_PASSWORD=postgres

teste_psql.php

<?php
$dbconn = pg_connect("host=localhost port=5432 dbname=postgres 
                  user=postgres password=postgres")
      or die('Não foi possível conectar: ' . pg_last_error());
echo 'Conectado: ', pg_dbname($dbconn);
?>
    
asked by anonymous 09.09.2015 / 06:22

0 answers