Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

DOCSP-47950: Fix all operator section #3308

Merged
merged 2 commits into from
Mar 6, 2025
Merged
Changes from 1 commit
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
2 changes: 1 addition & 1 deletion docs/includes/query-builder/QueryBuilderTest.php
Original file line number Diff line number Diff line change
@@ -351,7 +351,7 @@ public function testAll(): void
{
// begin query all
$result = DB::table('movies')
->where('movies', 'all', ['title', 'rated', 'imdb.rating'])
->where('cast', 'all', ['Meg Ryan', 'Tom Hanks'])
->get();
// end query all

3 changes: 2 additions & 1 deletion docs/query-builder.txt
Original file line number Diff line number Diff line change
@@ -869,7 +869,8 @@ 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:
documents that have a ``cast`` field containing all the specified
Copy link
Member

Choose a reason for hiding this comment

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

Can you choose an other field name, as casts has as special meaning in Laravel (its a reserved word in the model). That could lead to confusion: https://laravel.com/docs/12.x/eloquent-mutators#attribute-casting

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure, changed to "writers"

array values:

Choose a reason for hiding this comment

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

I'm not sure if this makes it clearer or not?

Suggested change
documents that have a ``cast`` field containing all the specified
array values:
documents that have a ``cast`` field array containing all the specified
array values:


.. literalinclude:: /includes/query-builder/QueryBuilderTest.php
:language: php
Loading