mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-14 12:30:49 +08:00
show-exam
This commit is contained in:
15
include/eloquent.php
Normal file
15
include/eloquent.php
Normal file
@@ -0,0 +1,15 @@
|
||||
<?php
|
||||
|
||||
use \Illuminate\Database\Capsule\Manager as Capsule;
|
||||
|
||||
$config = require ROOT_PATH . 'config/nexus.php';
|
||||
$connectionMysql = $config['mysql'];
|
||||
$connectionMysql['driver'] = 'mysql';
|
||||
$connectionMysql['charset'] = 'utf8mb4';
|
||||
$connectionMysql['collation'] = 'utf8mb4_unicode_ci';
|
||||
$capsule = new Capsule;
|
||||
$capsule->addConnection($connectionMysql, 'default');
|
||||
$capsule->setAsGlobal();
|
||||
$capsule->bootEloquent();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user