Are you sure it's enabled in php.ini. or if enabled while server was running, restart the server.
May 11, 2021
5
Level 1
PDOException::("could not find driver") - Laravel 8 connection to postgresql
Hi i got some problems to get connection to my db instance in postgres, i running laravel 8 on windows 10 "wamp" and installed postgresql. I start up all the services of the pgsql with pgAdmin4 and in wamp server i activated all pgsql extensions as well, and alway i get this error on the moment to run the migration for the db
Illuminate\Database\QueryException
could not find driver (SQL: select * from information_schema.tables where table_schema = public and table_name = migrations and table_type = 'BASE TABLE')
at C:\wamp64\www\dc\APRAY-50\client-dashboard\vendor\laravel\framework\src\Illuminate\Database\Connection.php:678
674▕ // If an exception occurs when attempting to run a query, we'll format the error
675▕ // message to include the bindings with SQL, which will make this exception a
676▕ // lot more helpful to the developer instead of just the database's errors.
677▕ catch (Exception $e) {
➜ 678▕ throw new QueryException(
679▕ $query, $this->prepareBindings($bindings), $e
680▕ );
681▕ }
682▕
1 C:\wamp64\www\dc\APRAY-50\client-dashboard\vendor\laravel\framework\src\Illuminate\Database\Connectors\Connector.php:70
PDOException::("could not find driver")
2 C:\wamp64\www\dc\APRAY-50\client-dashboard\vendor\laravel\framework\src\Illuminate\Database\Connectors\Connector.php:70
PDO::__construct("pgsql:host=localhost;dbname=apray-1;port=5432;sslmode=prefer", "postgres", "root", [])
this is my .env config
DB_CONNECTION=pgsql
DB_HOST=localhost
DB_PORT=5432
DB_DATABASE=apray-1
DB_USERNAME=postgres
DB_PASSWORD=root
I also tried to clean config cache but still no working
Level 75
Please or to participate in this conversation.