diff --git a/docs/database-collection.txt b/docs/database-collection.txt index fb6573147..be081c97b 100644 --- a/docs/database-collection.txt +++ b/docs/database-collection.txt @@ -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(); List Collection Fields ---------------------- diff --git a/docs/filesystems.txt b/docs/filesystems.txt index 725b799af..3ec7ee41f 100644 --- a/docs/filesystems.txt +++ b/docs/filesystems.txt @@ -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, @@ -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])