Skip to content

Commit ca4914c

Browse files
hackeljenssegers
authored andcommitted
Update MongoRegex references in README for new MongoDB driver (#952)
1 parent 467949f commit ca4914c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -482,10 +482,10 @@ User::where('tags', 'size', 3)->get();
482482
Selects documents where values match a specified regular expression.
483483

484484
```php
485-
User::where('name', 'regex', new MongoRegex("/.*doe/i"))->get();
485+
User::where('name', 'regex', new \MongoDB\BSON\Regex("/.*doe/i"))->get();
486486
```
487487

488-
**NOTE:** you can also use the Laravel regexp operations. These are a bit more flexible and will automatically convert your regular expression string to a MongoRegex object.
488+
**NOTE:** you can also use the Laravel regexp operations. These are a bit more flexible and will automatically convert your regular expression string to a MongoDB\BSON\Regex object.
489489

490490
```php
491491
User::where('name', 'regexp', '/.*doe/i'))->get();

0 commit comments

Comments
 (0)