Commit ca4914cc authored by Ryan Hayle's avatar Ryan Hayle Committed by Jens Segers

Update MongoRegex references in README for new MongoDB driver (#952)

parent 467949f7
...@@ -482,10 +482,10 @@ User::where('tags', 'size', 3)->get(); ...@@ -482,10 +482,10 @@ User::where('tags', 'size', 3)->get();
Selects documents where values match a specified regular expression. Selects documents where values match a specified regular expression.
```php ```php
User::where('name', 'regex', new MongoRegex("/.*doe/i"))->get(); User::where('name', 'regex', new \MongoDB\BSON\Regex("/.*doe/i"))->get();
``` ```
**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. **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.
```php ```php
User::where('name', 'regexp', '/.*doe/i'))->get(); User::where('name', 'regexp', '/.*doe/i'))->get();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment