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

1
  • Did you find a solution to this? Commented Nov 16, 2015 at 9:20

1 Answer 1

2

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

Sign up to request clarification or add additional context in comments.

2 Comments

Good catch. This is not outlined in the documentation though.
Yeah. Documentation is great but it's impossible to be absolutely 100% thorough ;)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.