Skip to content

orbital-framework/mongodb

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Orbital MongoDB

Sample config for MongoDB usage:

use \Orbital\Framework\App;
use \Orbital\Env\Env;

App::set('mongodb', array(
    'client' => array(
        'uri' => Env::get('MONGODB_URI'),
        'options' => array(),
        'driver' => array()
    ),
    'database' => array(
        'name' => Env::get('MONGODB_DATABASE'),
        'options' => array()
    )
));

Don't forget to append the following variables to your env.php file:

array(
    # ...
    'MONGODB_URI' => 'mongodb://user:password@localhost:27017',
    'MONGODB_DATABASE' => 'my-database',
    # ...
);