Skip to content

Commit 4490bca

Browse files
gahlawatjenssegers
authored andcommitted
using scope resolution operator and minor indentation fix (#1075)
1 parent 9e51051 commit 4490bca

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

README.md

+6-4
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ Jenssegers\Mongodb\MongodbServiceProvider::class,
5050
For usage with [Lumen](http://lumen.laravel.com), add the service provider in `bootstrap/app.php`. In this file, you will also need to enable Eloquent. You must however ensure that your call to `$app->withEloquent();` is **below** where you have registered the `MongodbServiceProvider`:
5151

5252
```php
53-
$app->register('Jenssegers\Mongodb\MongodbServiceProvider');
53+
$app->register(Jenssegers\Mongodb\MongodbServiceProvider::class);
5454

5555
$app->withEloquent();
5656
```
@@ -120,7 +120,7 @@ And add a new mongodb connection:
120120
'database' => env('DB_DATABASE'),
121121
'username' => env('DB_USERNAME'),
122122
'password' => env('DB_PASSWORD'),
123-
'options' => [
123+
'options' => [
124124
'database' => 'admin' // sets the authentication database required by mongo 3
125125
]
126126
],
@@ -136,7 +136,9 @@ You can connect to multiple servers or replica sets with the following configura
136136
'database' => env('DB_DATABASE'),
137137
'username' => env('DB_USERNAME'),
138138
'password' => env('DB_PASSWORD'),
139-
'options' => ['replicaSet' => 'replicaSetName']
139+
'options' => [
140+
'replicaSet' => 'replicaSetName'
141+
]
140142
],
141143
```
142144

@@ -182,7 +184,7 @@ Everything else (should) work just like the original Eloquent model. Read more a
182184
You may also register an alias for the MongoDB model by adding the following to the alias array in `config/app.php`:
183185

184186
```php
185-
'Moloquent' => 'Jenssegers\Mongodb\Eloquent\Model',
187+
'Moloquent' => Jenssegers\Mongodb\Eloquent\Model::class,
186188
```
187189

188190
This will allow you to use the registered alias like:

0 commit comments

Comments
 (0)