Skip to content

Commit 7e91b7a

Browse files
authored
wip
1 parent 29807a2 commit 7e91b7a

File tree

1 file changed

+17
-17
lines changed

1 file changed

+17
-17
lines changed

README.md

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Laravel MongoDB
33

44
[![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](https://img.shields.io/github/workflow/status/jenssegers/laravel-mongodb/CI)](https://github.com/jenssegers/laravel-mongodb/actions) [![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

6-
Laravel Eloquent add support for ODM (Object Document Mapper) to Laravel. It's the same as Eloquent ORM, but with Documents, since MongoDB is a NoSQL database.
6+
Laravel Eloquent adds support for ODM (Object Document Mapper) to Laravel. It's the same as Eloquent ORM, but with Documents, since MongoDB is a NoSQL database.
77

88
Table of contents
99
-----------------
@@ -112,7 +112,7 @@ Upgrading
112112

113113
In this new major release which supports the new MongoDB PHP extension, we also moved the location of the Model class and replaced the MySQL model class with a trait.
114114

115-
Please change all `Jenssegers\Mongodb\Model` references to `Jenssegers\Mongodb\Eloquent\Model` either at the top of your model files, or your registered alias.
115+
Please change all `Jenssegers\Mongodb\Model` references to `Jenssegers\Mongodb\Eloquent\Model` either at the top of your model files or your registered alias.
116116

117117
```php
118118
use Jenssegers\Mongodb\Eloquent\Model;
@@ -156,7 +156,7 @@ docker-compose up
156156

157157
Configuration
158158
-------------
159-
You can use MongoDB either as a main database, either as a side database. To do so, add a new `mongodb` connection to `config/database.php`:
159+
You can use MongoDB either as the main database, either as a side database. To do so, add a new `mongodb` connection to `config/database.php`:
160160

161161
```php
162162
'mongodb' => [
@@ -175,7 +175,7 @@ You can use MongoDB either as a main database, either as a side database. To do
175175
],
176176
```
177177

178-
For multiple servers or replica set configurations, set the host to array and specify each server host:
178+
For multiple servers or replica set configurations, set the host to an array and specify each server host:
179179

180180
```php
181181
'mongodb' => [
@@ -188,7 +188,7 @@ For multiple servers or replica set configurations, set the host to array and sp
188188
],
189189
```
190190

191-
If you wish to use a connection string instead of a full key-value params, you can set it so. Check the documentation on MongoDB's URI format: https://docs.mongodb.com/manual/reference/connection-string/
191+
If you wish to use a connection string instead of full key-value params, you can set it so. Check the documentation on MongoDB's URI format: https://docs.mongodb.com/manual/reference/connection-string/
192192

193193
```php
194194
'mongodb' => [
@@ -226,7 +226,7 @@ class Book extends Model
226226
}
227227
```
228228

229-
**NOTE:** MongoDb documents are automatically stored with an unique ID that is stored in the `_id` property. If you wish to use your own ID, substitude the `$primaryKey` property and set it to your own primary key attribute name.
229+
**NOTE:** MongoDB documents are automatically stored with a unique ID that is stored in the `_id` property. If you wish to use your own ID, substitute the `$primaryKey` property and set it to your own primary key attribute name.
230230

231231
```php
232232
use Jenssegers\Mongodb\Eloquent\Model;
@@ -339,7 +339,7 @@ $users =
339339
$users = User::whereIn('age', [16, 18, 20])->get();
340340
```
341341

342-
When using `whereNotIn` objects will be returned if the field is non existent. Combine with `whereNotNull('age')` to leave out those documents.
342+
When using `whereNotIn` objects will be returned if the field is non-existent. Combine with `whereNotNull('age')` to leave out those documents.
343343

344344
**whereBetween**
345345

@@ -538,10 +538,10 @@ User::where('age', 'mod', [10, 0])->get();
538538

539539
```php
540540
$bars = Bar::where('location', 'near', [
541-
'$geometry' => [
541+
'$geometry' => [
542542
'type' => 'Point',
543-
'coordinates' => [
544-
-0.1367563, // longitude
543+
'coordinates' => [
544+
-0.1367563, // longitude
545545
51.5100913, // latitude
546546
],
547547
],
@@ -553,9 +553,9 @@ $bars = Bar::where('location', 'near', [
553553

554554
```php
555555
$bars = Bar::where('location', 'geoWithin', [
556-
'$geometry' => [
556+
'$geometry' => [
557557
'type' => 'Polygon',
558-
'coordinates' => [
558+
'coordinates' => [
559559
[
560560
[-0.1450383, 51.5069158],
561561
[-0.1367563, 51.5100913],
@@ -767,7 +767,7 @@ class Item extends Model
767767

768768
### belongsToMany and pivots
769769

770-
The belongsToMany relation will not use a pivot "table", but will push id's to a __related_ids__ attribute instead. This makes the second parameter for the belongsToMany method useless.
770+
The belongsToMany relation will not use a pivot "table" but will push id's to a __related_ids__ attribute instead. This makes the second parameter for the belongsToMany method useless.
771771

772772
If you want to define custom keys for your relation, set it to `null`:
773773

@@ -787,7 +787,7 @@ class User extends Model
787787

788788
### EmbedsMany Relationship
789789

790-
If you want to embed models, rather than referencing them, you can use the `embedsMany` relation. This relation is similar to the `hasMany` relation, but embeds the models inside the parent object.
790+
If you want to embed models, rather than referencing them, you can use the `embedsMany` relation. This relation is similar to the `hasMany` relation but embeds the models inside the parent object.
791791

792792
**REMEMBER**: These relations return Eloquent collections, they don't return query builder objects!
793793

@@ -1000,7 +1000,7 @@ MongoDB specific operations:
10001000
- expire
10011001
- geospatial
10021002

1003-
All other (unsupported) operations are implemented as dummy pass-through methods, because MongoDB does not use a predefined schema.
1003+
All other (unsupported) operations are implemented as dummy pass-through methods because MongoDB does not use a predefined schema.
10041004

10051005
Read more about the schema builder on [Laravel Docs](https://laravel.com/docs/6.0/migrations#tables)
10061006

@@ -1033,11 +1033,11 @@ If you're using a hybrid MongoDB and SQL setup, you can define relationships acr
10331033

10341034
The model will automatically return a MongoDB-related or SQL-related relation based on the type of the related model.
10351035

1036-
If you want this functionality to work both ways, your SQL-models will need use the `Jenssegers\Mongodb\Eloquent\HybridRelations` trait.
1036+
If you want this functionality to work both ways, your SQL-models will need to use the `Jenssegers\Mongodb\Eloquent\HybridRelations` trait.
10371037

10381038
**This functionality only works for `hasOne`, `hasMany` and `belongsTo`.**
10391039

1040-
The MySQL model shoul use the `HybridRelations` trait:
1040+
The MySQL model should use the `HybridRelations` trait:
10411041

10421042
```php
10431043
use Jenssegers\Mongodb\Eloquent\HybridRelations;

0 commit comments

Comments
 (0)