Skip to content

Commit 5f877df

Browse files
committed
Rename Connection::getMongoDB to getDatabase
1 parent 0a80c70 commit 5f877df

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

docs/database-collection.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ the collections in the database:
225225

226226
.. code-block:: php
227227

228-
$collections = DB::connection('mongodb')->getMongoDB()->listCollections();
228+
$collections = DB::connection('mongodb')->getDatabase()->listCollections();
229229

230230
List Collection Fields
231231
----------------------

docs/filesystems.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ In this case, the options ``connection`` and ``database`` are ignored:
9494
'driver' => 'gridfs',
9595
'bucket' => static function (Application $app): Bucket {
9696
return $app['db']->connection('mongodb')
97-
->getMongoDB()
97+
->getDatabase()
9898
->selectGridFSBucket([
9999
'bucketName' => 'avatars',
100100
'chunkSizeBytes' => 261120,
@@ -150,7 +150,7 @@ if you need to work with revisions, as shown in the following code:
150150

151151
// Create a bucket service from the MongoDB connection
152152
/** @var \MongoDB\GridFS\Bucket $bucket */
153-
$bucket = $app['db']->connection('mongodb')->getMongoDB()->selectGridFSBucket();
153+
$bucket = $app['db']->connection('mongodb')->getDatabase()->selectGridFSBucket();
154154

155155
// Download the last but one version of a file
156156
$bucket->openDownloadStreamByName('hello.txt', ['revision' => -2])

0 commit comments

Comments
 (0)