6

I am trying to connect PostgreSQL with Laravel 5.0 but facing exception "Could not Find Driver in PostgreSQL".

I have tried this solution but cannot connected with PostgreSQL

stackoverflow answer

My database.php config file is following

'default' => 'pgsql'

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

PDO extensions are enabled in php.ini

extension=php_pdo.dll

extension=php_pdo_pgsql.dll

when i run following command

php artisan migrate

it gives error

[PDOException] could not find driver

Its working fine when we connect PostgreSQL with Core PHP.

is there any driver still missing in Laravel? Please guide me.

Thank You

Community
  • 1
  • 1
yousafHarry
  • 133
  • 7

1 Answers1

2

You must be ssh'd into your homestead or vagrant box. Then try to migrate.

lukeed
  • 409
  • 2
  • 5
  • 13