Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
Slim - Eloquent container
<?php
$capsule = new \Illuminate\Database\Capsule\Manager;
$capsule->addConnection($container['settings']['db']);
$capsule->setAsGlobal();
$capsule->bootEloquent();
$container['db'] = function ($container) {
return $capsule;
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment