Skip to content
This repository was archived by the owner on Aug 22, 2023. It is now read-only.

Commit 32cf6ae

Browse files
committed
Update doc
1 parent c76bcb8 commit 32cf6ae

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

README.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -631,6 +631,17 @@ $bars = Bar::raw(function ($collection) {
631631
});
632632
```
633633

634+
**Other operators**
635+
636+
You can use any [MongoDB query operator](https://www.mongodb.com/docs/manual/reference/operator/query/#query-selectors) with the `where` function:
637+
638+
```php
639+
$bars = Bar::where('qty', 'all', [
640+
[ '$elemMatch' => [ 'size' => 'M', 'num' => [ '$gt' => 50] ] ],
641+
[ '$elemMatch' => [ 'num' => 100, 'color' => 'green' ] ],
642+
])->get();
643+
```
644+
634645
### Inserts, updates and deletes
635646

636647
Inserting, updating and deleting records works just like the original Eloquent. Please check [Laravel Docs' Eloquent section](https://laravel.com/docs/6.x/eloquent).

0 commit comments

Comments
 (0)