Commit a4c2c7b0 authored by Jens Segers's avatar Jens Segers

Tweaking DSN for issue #21

parent 51bb07ad
......@@ -258,15 +258,15 @@ Or you can access the internal object directly:
Add one or more items to an array.
User::where('name', 'John')->push('items', 'boots');
User::where('name', 'John')->push('items', array('sword', 'shield'));
DB::collection('users')->where('name', 'John')->push('items', 'boots');
DB::collection('users')->where('name', 'John')->push('items', array('sword', 'shield'));
**Pull**
Remove one or more values from an array.
User::where('name', 'John')->pull('items', 'boots');
User::where('name', 'John')->pull('items', array('sword', 'shield'));
DB::collection('users')->where('name', 'John')->pull('items', 'boots');
DB::collection('users')->where('name', 'John')->pull('items', array('sword', 'shield'));
### Query Caching
......
......@@ -37,7 +37,7 @@ class Connection extends \Illuminate\Database\Connection {
$this->connection = new MongoClient($this->getDsn($config), $options);
// Select database
$this->db = $this->connection->{$config['database']};
$this->db = $this->connection->selectDB($config['database']);
}
/**
......@@ -130,7 +130,7 @@ class Connection extends \Illuminate\Database\Connection {
$credentials = '';
}
return "mongodb://{$credentials}" . implode(',', $hosts) . "/{$database}";
return "mongodb://{$credentials}" . implode(',', $hosts);
}
/**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment