You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
An Eloquent model and Query builder with support for MongoDB, using the original Laravel API. *This library extends the original Laravel classes, so it uses exactly the same methods.*
You can also pass all the parameters specified in the MongoDB docs [here](https://docs.mongodb.com/manual/reference/method/db.collection.createIndex/#options-for-all-index-types) in the `$options` parameter. For example:
All other (unsupported) operations are implemented as dummy pass-through methods, because MongoDB does not use a predefined schema. Read more about the schema builder on http://laravel.com/docs/schema
277
+
All other (unsupported) operations are implemented as dummy pass-through methods, because MongoDB does not use a predefined schema. Read more about the schema builder on https://laravel.com/docs/6.0/migrations#tables
267
278
268
279
### Geospatial indexes
269
280
@@ -312,6 +323,7 @@ If you want to use MongoDB as your database backend, change the driver in `confi
312
323
'queue' => 'default',
313
324
'expire' => 60,
314
325
],
326
+
]
315
327
```
316
328
317
329
If you want to use MongoDB to handle failed jobs, change the database in `config/queue.php`:
@@ -320,7 +332,7 @@ If you want to use MongoDB to handle failed jobs, change the database in `config
320
332
'failed' => [
321
333
'database' => 'mongodb',
322
334
'table' => 'failed_jobs',
323
-
],
335
+
],
324
336
```
325
337
326
338
And add the service provider in `config/app.php`:
@@ -549,13 +561,13 @@ User::where('name', 'regex', new \MongoDB\BSON\Regex("/.*doe/i"))->get();
549
561
**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.
@@ -693,7 +705,7 @@ For more information about model manipulation, check http://laravel.com/docs/elo
693
705
694
706
### Dates
695
707
696
-
Eloquent allows you to work with Carbon/DateTime objects instead of MongoDate objects. Internally, these dates will be converted to MongoDate objects when saved to the database. If you wish to use this functionality on non-default date fields, you will need to manually specify them as described here: http://laravel.com/docs/eloquent#date-mutators
708
+
Eloquent allows you to work with Carbon/DateTime objects instead of MongoDate objects. Internally, these dates will be converted to MongoDate objects when saved to the database. If you wish to use this functionality on non-default date fields, you will need to manually specify them as described here: https://laravel.com/docs/5.0/eloquent#date-mutators
697
709
698
710
Example:
699
711
@@ -770,7 +782,7 @@ class User extends Eloquent {
770
782
```
771
783
772
784
773
-
Other relations are not yet supported, but may be added in the future. Read more about these relations on http://laravel.com/docs/eloquent#relationships
785
+
Other relations are not yet supported, but may be added in the future. Read more about these relations on https://laravel.com/docs/master/eloquent-relationships
0 commit comments