Skip to content

Commit 4ab85df

Browse files
committed
Update README
1 parent 069b233 commit 4ab85df

File tree

1 file changed

+15
-13
lines changed

1 file changed

+15
-13
lines changed

README.md

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Laravel MongoDB
22
===============
33

4-
[![Latest Stable Version](http://img.shields.io/github/release/jenssegers/laravel-mongodb.svg)](https://packagist.org/packages/jenssegers/mongodb) [![Total Downloads](http://img.shields.io/packagist/dm/jenssegers/mongodb.svg)](https://packagist.org/packages/jenssegers/mongodb) [![Build Status](http://img.shields.io/travis/jenssegers/laravel-mongodb.svg)](https://travis-ci.org/jenssegers/laravel-mongodb) [![Coverage Status](http://img.shields.io/coveralls/jenssegers/laravel-mongodb.svg)](https://coveralls.io/r/jenssegers/laravel-mongodb?branch=master) [![Donate](https://img.shields.io/badge/donate-paypal-blue.svg)](https://www.paypal.me/jenssegers)
4+
[![Latest Stable Version](http://img.shields.io/github/release/jenssegers/laravel-mongodb.svg)](https://packagist.org/packages/jenssegers/mongodb) [![Total Downloads](http://img.shields.io/packagist/dm/jenssegers/mongodb.svg)](https://packagist.org/packages/jenssegers/mongodb) [![Build Status](http://img.shields.io/travis/jenssegers/laravel-mongodb.svg)](https://travis-ci.org/jenssegers/laravel-mongodb) [[![Coverage Status](https://coveralls.io/repos/github/jenssegers/laravel-mongodb/badge.svg?branch=master)](https://coveralls.io/github/jenssegers/laravel-mongodb?branch=master) [![Donate](https://img.shields.io/badge/donate-paypal-blue.svg)](https://www.paypal.me/jenssegers)
55

66
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.*
77

@@ -45,6 +45,7 @@ composer require jenssegers/mongodb
4545
5.6.x | 3.4.x
4646
5.7.x | 3.4.x
4747
5.8.x | 3.5.x
48+
6.0.x | 3.6.x
4849

4950
And add the service provider in `config/app.php`:
5051

@@ -153,8 +154,8 @@ You can connect to multiple servers or replica sets with the following configura
153154
'username' => env('DB_USERNAME'),
154155
'password' => env('DB_PASSWORD'),
155156
'options' => [
156-
'replicaSet' => 'replicaSetName'
157-
]
157+
'replicaSet' => 'replicaSetName'
158+
]
158159
],
159160
```
160161

@@ -263,7 +264,7 @@ Supported operations are:
263264
- unique
264265
- background, sparse, expire, geospatial (MongoDB specific)
265266

266-
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
267+
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
267268

268269
### Geospatial indexes
269270

@@ -312,6 +313,7 @@ If you want to use MongoDB as your database backend, change the driver in `confi
312313
'queue' => 'default',
313314
'expire' => 60,
314315
],
316+
]
315317
```
316318

317319
If you want to use MongoDB to handle failed jobs, change the database in `config/queue.php`:
@@ -320,7 +322,7 @@ If you want to use MongoDB to handle failed jobs, change the database in `config
320322
'failed' => [
321323
'database' => 'mongodb',
322324
'table' => 'failed_jobs',
323-
],
325+
],
324326
```
325327

326328
And add the service provider in `config/app.php`:
@@ -601,15 +603,15 @@ $users = User::where('location', 'geoWithin', [
601603
[
602604
-0.1450383,
603605
51.5069158,
604-
],
606+
],
605607
[
606608
-0.1367563,
607609
51.5100913,
608-
],
610+
],
609611
[
610612
-0.1270247,
611613
51.5013233,
612-
],
614+
],
613615
[
614616
-0.1450383,
615617
51.5069158,
@@ -693,7 +695,7 @@ For more information about model manipulation, check http://laravel.com/docs/elo
693695

694696
### Dates
695697

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
698+
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
697699

698700
Example:
699701

@@ -770,7 +772,7 @@ class User extends Eloquent {
770772
```
771773

772774

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
775+
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
774776

775777
### EmbedsMany Relations
776778

@@ -969,7 +971,7 @@ $cursor = DB::collection('users')->raw(function($collection)
969971
Optional: if you don't pass a closure to the raw method, the internal MongoCollection object will be accessible:
970972

971973
```php
972-
$model = User::raw()->findOne(['age' => array('$lt' => 18)]);
974+
$model = User::raw()->findOne(['age' => ['$lt' => 18]]);
973975
```
974976

975977
The internal MongoClient and MongoDB objects can be accessed like this:
@@ -1063,7 +1065,7 @@ You may easily cache the results of a query using the remember method:
10631065
$users = User::remember(10)->get();
10641066
```
10651067

1066-
*From: http://laravel.com/docs/queries#caching-queries*
1068+
*From: https://laravel.com/docs/4.2/queries#caching-queries*
10671069

10681070
### Query Logging
10691071

@@ -1073,4 +1075,4 @@ By default, Laravel keeps a log in memory of all queries that have been run for
10731075
DB::connection()->disableQueryLog();
10741076
```
10751077

1076-
*From: http://laravel.com/docs/database#query-logging*
1078+
*From: https://laravel.com/docs/4.2/database#query-logging*

0 commit comments

Comments
 (0)