LaravelPOSTGRESQL
How To Use Laravel With PostgreSQL.
By default Laravel uses MySQL however we can connect any database like PostgreSQL. Changing default database that is from MYSQL to PostgreSQL is very simple.
Laravel makes connecting with PostgreSQL and running queries extremely simple out of the box.1.
Install PostgreSQL.
https://www.postgresql.org/download/
Enable pgsql extension in php.ini.
;extension=pdo_pgsql
;extension=pgsql
Remove semicolon from above line in php.ini and it looks like below.
extension=pdo_pgsql
extension=pgsql
Edit .env file.
DB_CONNECTION=pgsql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=database_name
DB_USERNAME=root
DB_PASSWORD=