Commit d27f0691 authored by Jens Segers's avatar Jens Segers

Reverting DSN changes, issue #21

parent a4c2c7b0
......@@ -37,7 +37,7 @@ class Connection extends \Illuminate\Database\Connection {
$this->connection = new MongoClient($this->getDsn($config), $options);
// Select database
$this->db = $this->connection->selectDB($config['database']);
$this->db = $this->connection->{$config['database']};
}
/**
......@@ -130,7 +130,7 @@ class Connection extends \Illuminate\Database\Connection {
$credentials = '';
}
return "mongodb://{$credentials}" . implode(',', $hosts);
return "mongodb://{$credentials}" . implode(',', $hosts) . "/{$database}";
}
/**
......
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