diff --git a/src/CollectionFactory.php b/src/CollectionFactory.php index 216ecdd..a2dc635 100644 --- a/src/CollectionFactory.php +++ b/src/CollectionFactory.php @@ -32,6 +32,6 @@ public function create(string $collectionName, string $databaseName = null, arra throw new \LogicException('Failed to guess database name, neither mongo DSN nor argument have it.'); } - $this->mongodb->selectCollection($databaseName, $collectionName, $options); + return $this->mongodb->selectCollection($databaseName, $collectionName, $options); } }