Laravel Connecting to Postgres database - Laravel 5


Lets see how to connect Laravel with Postgres Database


Laravel makes connecting with Postgres databases and running queries extremely simple out of the box. The Postgres database configuration for your application is located at Laravel Project Root Folder, config/database.php. In this file you may define Postgres database connection for your Laravel Application.


'pgsql' => [
    'driver'   => 'pgsql',
    'host'     => env('DB_HOST', 'localhost'),
    'database' => env('DB_DATABASE', 'forge'),
    'username' => env('DB_USERNAME', 'forge'),
    'password' => env('DB_PASSWORD', ''),
    'charset'  => 'utf8',
    'prefix'   => '',
    'schema'   => 'public',
],


if you have any questions regarding laravel Postgres database connection, please feel free to leave your comment bellow.

Written by Akram Wahid 6 years ago

are you looking for a chief cook who can well craft laravel and vuejs, to make some awsome butterscotch,
yes then it is right time for you to look at my profile.

Do you want to write Response or Comment?

You must be a member of techalyst to proceed!

Continue with your Email ? Sign up / log in

Responses

Be the first one to write a response :(

{{ item.member.name }} - {{ item.created_at_human_readable }}

{{ reply.member.name }} - {{ reply.created_at_human_readable }}