.env file
DB_CONNECTION=pgsql
DB_HOST=127.0.0.1
DB_PORT=5432
DB_DATABASE=p1
DB_USERNAME=postgres
DB_PASSWORD=123456tuyyo
file config / database.php
'default' => env('DB_CONNECTION', 'pgsql'),
The problem is that you have not enabled the drives
or dlls
what you have to do is go to the folder where your php
is installed, in my case it is: C:\xampp\php
where there is a file called php.ini
, you open it with administrator privileges and you go to the line 905 (approx) where is the following line:
;extension=pdo_pgsql
one line below 907 has a line:
;extension=pgsql
Then all you have to do is remove the semicolon (;), which is in front of those lines and would look like this.
extension=pdo_pgsql
extension=pgsql
and ready save the changes and it will work correctly.