Last active
August 29, 2015 14:25
-
-
Save mcabreradev/f6b99fa9df32de4c5039 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
use Illuminate\Database\Capsule\Manager as Capsule; | |
$capsule = new Capsule; | |
$capsule->addConnection([ | |
'driver' => 'mysql', | |
'host' => 'localhost', | |
'database' => 'neobiz_dev', | |
'username' => 'root', | |
'password' => 'root', | |
'charset' => 'utf8', | |
'collation' => 'utf8_unicode_ci', | |
'prefix' => '', | |
]); | |
// Set the event dispatcher used by Eloquent models... (optional) | |
use Illuminate\Events\Dispatcher; | |
use Illuminate\Container\Container; | |
$capsule->setEventDispatcher(new Dispatcher(new Container)); | |
// Make this Capsule instance available globally via static methods... (optional) | |
$capsule->setAsGlobal(); | |
// Setup the Eloquent ORM... (optional; unless you've used setEventDispatcher()) | |
$capsule->bootEloquent(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment