Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

ianasystems's avatar

Laravel Database Connection Error Could Not Find Driver pgsql

I'm facing an issue with my Laravel application where it's unable to connect to the PostgreSQL database, throwing the error "Illuminate\Database\QueryException: could not find driver".

' Illuminate\Database\QueryException

Could not find driver (Connection: pgsql, SQL: select * from information_schema.tables where table_catalog = tradewithshine and table_schema = public and table_name = migrations and table_type = 'BASE TABLE')

at vendor/laravel/framework/src/Illuminate/Database/Connection.php:801 797▕ $this->getName(), $query, $this->prepareBindings($bindings), $e 798▕ ); 799▕ } 800▕ ➜ 801▕ throw new QueryException( 802▕ $this->getName(), $query, $this->prepareBindings($bindings), $e 803▕ ); 804▕ } 805▕ }

  +35 vendor frames 

36 artisan:38 Illuminate\Foundation\Console\Kernel::handle() '

0 likes
0 replies

Please or to participate in this conversation.