laravel postgresql code example

Example 1: laravel conexion postgresql example

# your root project modify the .env file | grep DB

DB_CONNECTION=pgsql
DB_HOST=<your_database_IP_address>
DB_PORT=5432
DB_DATABASE=postgres
DB_USERNAME=postgres
DB_PASSWORD=postgres

Example 2: how to start postgresql laravel

;extension=pdo_pgsql;extension=pgsql

Example 3: how to start postgresql laravel

DB_CONNECTION=pgsqlDB_HOST=127.0.0.1DB_PORT=5432DB_DATABASE=database_nameDB_USERNAME=postgresDB_PASSWORD=your_choosen_password

Example 4: how to start postgresql laravel

extension=pdo_pgsqlextension=pgsql