Skip to content

Commit

Permalink
Merge pull request #2236 from ThomasWestrelin/ThomasWestrelin-patch-1
Browse files Browse the repository at this point in the history
Add setDatabase to Jenssegers\Mongodb\Connection
  • Loading branch information
Smolevich authored Apr 30, 2021
2 parents 114afa0 + 3bd58e0 commit 73b6a91
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/Jenssegers/Mongodb/Connection.php
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,16 @@ protected function getDefaultSchemaGrammar()
{
return new Schema\Grammar();
}

/**
* Set database.
* @param \MongoDB\Database $db
*/
public function setDatabase(\MongoDB\Database $db)
{
$this->db = $db;
}


/**
* Dynamically pass methods to the connection.
Expand Down

0 comments on commit 73b6a91

Please sign in to comment.