v.0.1
This commit is contained in:
22
app/models/Database.php
Normal file
22
app/models/Database.php
Normal file
@ -0,0 +1,22 @@
|
||||
<?php
|
||||
namespace Models;
|
||||
use Illuminate\Database\Capsule\Manager as Capsule;
|
||||
|
||||
class Database {
|
||||
public function __construct()
|
||||
{
|
||||
$capsule = new Capsule;
|
||||
$capsule->addConnection([
|
||||
'driver' => DBDRIVER,
|
||||
'host' => DBHOST,
|
||||
'database' => DBNAME,
|
||||
'username' => DBUSER,
|
||||
'password' => DBPASS,
|
||||
'charset' => 'utf8',
|
||||
'collation' => 'utf8_unicode_ci',
|
||||
'prefix' => '',
|
||||
]);
|
||||
// Setup the Eloquent ORM…
|
||||
$capsule->bootEloquent();
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user