Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/database-collection.txt
Original file line number Diff line number Diff line change
Expand Up @@ -219,13 +219,13 @@ methods in your application:
Example
```````

The following example accesses a database connection, then calls the
The following example accesses the database of the connection, then calls the
``listCollections()`` query builder method to retrieve information about
the collections in the database:

.. code-block:: php

$collections = DB::connection('mongodb')->getMongoDB()->listCollections();
$collections = DB::connection('mongodb')->getDatabase()->listCollections();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think he paragraph before this example can be fixed:

The following example accesses the database of the connection,


List Collection Fields
----------------------
Expand Down
4 changes: 2 additions & 2 deletions docs/filesystems.txt
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ In this case, the options ``connection`` and ``database`` are ignored:
'driver' => 'gridfs',
'bucket' => static function (Application $app): Bucket {
return $app['db']->connection('mongodb')
->getMongoDB()
->getDatabase()
->selectGridFSBucket([
'bucketName' => 'avatars',
'chunkSizeBytes' => 261120,
Expand Down Expand Up @@ -150,7 +150,7 @@ if you need to work with revisions, as shown in the following code:

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

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