25 lines
546 B
PHP
Executable File
25 lines
546 B
PHP
Executable File
<?php
|
|
|
|
use Illuminate\Database\Capsule\Manager as Capsule;
|
|
|
|
$capsule = new Capsule;
|
|
|
|
$capsule->addConnection([
|
|
'driver' => $_ENV['DB_CONNECTION'],
|
|
'host' => $_ENV['DB_HOST'],
|
|
'database' => $_ENV['DB_DATABASE'],
|
|
'username' => $_ENV['DB_USERNAME'],
|
|
'password' => $_ENV['DB_PASSWORD'],
|
|
'charset' => 'utf8',
|
|
'collation' => 'utf8_unicode_ci',
|
|
'prefix' => '',
|
|
]);
|
|
|
|
// Set the Capsule as the global manager for Eloquent ORM
|
|
$capsule->setAsGlobal();
|
|
|
|
// Initialize Eloquent ORM
|
|
$capsule->bootEloquent();
|
|
|
|
|