Skip to content

Commit bb292f9

Browse files
Add set database on connection
1 parent 09fcda8 commit bb292f9

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/Jenssegers/Mongodb/Connection.php

+10
Original file line numberDiff line numberDiff line change
@@ -266,6 +266,16 @@ protected function getDefaultSchemaGrammar()
266266
{
267267
return new Schema\Grammar();
268268
}
269+
270+
/**
271+
* Set database.
272+
* @param \MongoDB\Database $db
273+
*/
274+
public function setDatabase(\MongoDB\Database $db)
275+
{
276+
$this->db = $db;
277+
}
278+
269279

270280
/**
271281
* Dynamically pass methods to the connection.

0 commit comments

Comments
 (0)