<?php

use Illuminate\Database\Capsule\Manager as Capsule;

(new \Illuminate\Database\DatabaseServiceProvider($app))->register();

$capsule = new Capsule($app);

$capsule->addConnection([
    'driver'    => 'mysql',
    'host'      => MYSQL_HOST,
    'database'  => MYSQL_DB,
    'username'  => MYSQL_USER,
    'password'  => MYSQL_PASS,
    'charset'   => 'utf8',
    'collation' => 'utf8_unicode_ci',
    'prefix'    => '',
    'strict'    => false,
]);

$capsule->setAsGlobal();
$capsule->bootEloquent();
