/var/www/hkosl.com/demo_google/application/third_party/Eloquent.php


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
<?php

defined
('BASEPATH') OR exit('No direct script access allowed');

use 
Illuminate\Database\Capsule\Manager as Capsule;

// Autoload 自动载入
require FCPATH.'/vendor/autoload.php';

// 载入数据库配置文件
require_once APPPATH.'/config/database.php';

// Eloquent ORM
$capsule = new Capsule;

$capsule->addConnection($db['eloquent']);

$capsule->bootEloquent();