diff --git a/docs/includes/query-builder/QueryBuilderTest.php b/docs/includes/query-builder/QueryBuilderTest.php index 574fe060f..9bbaf5a6e 100644 --- a/docs/includes/query-builder/QueryBuilderTest.php +++ b/docs/includes/query-builder/QueryBuilderTest.php @@ -351,7 +351,7 @@ public function testAll(): void { // begin query all $result = DB::table('movies') - ->where('movies', 'all', ['title', 'rated', 'imdb.rating']) + ->where('genres', 'all', ['Animation', 'Comedy', 'Short']) ->get(); // end query all diff --git a/docs/query-builder.txt b/docs/query-builder.txt index c641323dc..bb3d6bc5a 100644 --- a/docs/query-builder.txt +++ b/docs/query-builder.txt @@ -868,8 +868,9 @@ Contains All Fields Example ~~~~~~~~~~~~~~~~~~~~~~~~~~~ The following example shows how to use the ``all`` query -operator with the ``where()`` query builder method to match -documents that contain all the specified fields: +operator with the ``where()`` query builder method to match documents in the +``movies`` collection where the array stored in the ``genres`` field contains +all the elements in the query array: .. literalinclude:: /includes/query-builder/QueryBuilderTest.php :language: php