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 ?
in app/config/database.php
'pgsql' => array(
'driver' => 'pgsql',
'host' => 'localhost',
'database' => 'forge',
'username' => 'forge',
'password' => '',
'charset' => 'utf8',
'prefix' => '',
'schema' => 'public',
),
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.