wire eloquent capsule
This commit is contained in:
parent
2e1c9282c5
commit
50814ffd60
2 changed files with 28 additions and 3 deletions
20
backend/config/database.php
Normal file
20
backend/config/database.php
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Capsule\Manager as Capsule;
|
||||
|
||||
$capsule = new Capsule();
|
||||
|
||||
$capsule->addConnection([
|
||||
'driver' => 'pgsql',
|
||||
'host' => $_ENV['DB_HOST'],
|
||||
'port' => $_ENV['DB_PORT'],
|
||||
'database' => $_ENV['DB_NAME'],
|
||||
'username' => $_ENV['DB_USER'],
|
||||
'password' => $_ENV['DB_PASSWORD'],
|
||||
'charset' => 'utf8',
|
||||
]);
|
||||
|
||||
$capsule->setAsGlobal();
|
||||
$capsule->bootEloquent();
|
||||
|
||||
return $capsule;
|
||||
Loading…
Add table
Add a link
Reference in a new issue