Home:ALL Converter>How to set default postgresql schema for laravel?

How to set default postgresql schema for laravel?

Ask Time:2017-07-22T00:39:28         Author:Oto Shavadze

Json Formatter

I created new postgresql user:

CREATE ROLE lara_user SUPERUSER LOGIN PASSWORD 'mypassword';

Then create schema which is owned by this user

CREATE schema lara AUTHORIZATION lara_user;

In Laravel's .env file I have

DB_DATABASE=postgres
DB_USERNAME=lara_user
DB_PASSWORD=mypassword

Laravel don't sees schema lara and still connected to public schema.

How can I change and set default schema lara for Laravel ?

Author:Oto Shavadze,eproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/45242702/how-to-set-default-postgresql-schema-for-laravel
yy