0

On web, database is connected with application. But, on command line gives following error:

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\hrmnxt\vendor\laravel\framework\src\Illuminate\Database\Connection.php:669

             // If an exception occurs when attempting to run a query, we'll format the error
             // message to include the bindings with SQL, which will make this exception a
             // lot more helpful to the developer instead of just the database's errors.
             catch (Exception $e) {
                 throw new QueryException(
                     $query, $this->prepareBindings($bindings), $e
                 );
             }


  Exception trace:

  1   PDOException::("could not find driver")
      C:\wamp64\www\hrmnxt\vendor\laravel\framework\src\Illuminate\Database\Connectors\Connector.php:70

  2   PDO::__construct("pgsql:host=localhost;dbname=hrmnxt;port=5432;sslmode=prefer", "postgres", "secret", [])
      C:\wamp64\www\hrmnxt\vendor\laravel\framework\src\Illuminate\Database\Connectors\Connector.php:70

Laravel: 6

Postgresql 9.6

Joundill
  • 6,828
  • 12
  • 36
  • 50

1 Answers1

0

I never encountered such problem but perhaps you should firts start checking if you have all the requirements (of laravel installation) PHP Modules activated like (https://laravel.com/docs/7.x/installation) Specifically this one :

PDO PHP Extension

This link could help you debug : Laravel: PDOException: could not find driver

If it doesn't work tell me I'll help you.

Sapelogeek
  • 21
  • 1
  • 3