Commit d26a192f authored by Ditty's avatar Ditty

Fix Regex example

Fixed a regex example which accepts two parameters instead of one http://docs.php.net/manual/en/mongodb-bson-regex.construct.php#refsect1-mongodb-bson-regex.construct-examplesCo-Authored-By: 's avatarryan7n <ryan7n@users.noreply.github.com>
parent 2efa5af9
......@@ -460,7 +460,7 @@ Selects documents where values match a specified regular expression.
```php
use MongoDB\BSON\Regex;
User::where('name', 'regex', new Regex("/.*doe/i"))->get();
User::where('name', 'regex', new 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 `MongoDB\BSON\Regex` object.
......
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