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.
This package adds functionalities to the Eloquent model and Query builder for MongoDB, using the original Laravel API. *This library extends the original Laravel classes, so it uses exactly the same methods.*
-[Laravel MongoDB](#laravel-mongodb)
-[Laravel MongoDB](#laravel-mongodb)
-[Laravel Installation](#laravel-installation)
-[Installation](#installation)
-[Laravel version Compatibility](#laravel-version-compatibility)
-[Laravel version Compatibility](#laravel-version-compatibility)
-[Laravel](#laravel)
-[Laravel](#laravel)
-[Lumen](#lumen)
-[Lumen](#lumen)
...
@@ -29,7 +28,7 @@ Laravel Eloquent adds support for ODM (Object Document Mapper) to Laravel. It's
...
@@ -29,7 +28,7 @@ Laravel Eloquent adds support for ODM (Object Document Mapper) to Laravel. It's
-[Basic Usage](#basic-usage-1)
-[Basic Usage](#basic-usage-1)
-[belongsToMany and pivots](#belongstomany-and-pivots)
-[belongsToMany and pivots](#belongstomany-and-pivots)
Make sure you have the MongoDB PHP driver installed. You can find installation instructions at http://php.net/manual/en/mongodb.installation.php
Make sure you have the MongoDB PHP driver installed. You can find installation instructions at http://php.net/manual/en/mongodb.installation.php
...
@@ -874,7 +873,7 @@ class User extends Model
...
@@ -874,7 +873,7 @@ class User extends Model
Embedded relations will return a Collection of embedded items instead of a query builder. Check out the available operations here: https://laravel.com/docs/master/collections
Embedded relations will return a Collection of embedded items instead of a query builder. Check out the available operations here: https://laravel.com/docs/master/collections
### EmbedsOne Relations
### EmbedsOne Relationship
The embedsOne relation is similar to the embedsMany relation, but only embeds a single model.
The embedsOne relation is similar to the embedsMany relation, but only embeds a single model.
...
@@ -1023,7 +1022,7 @@ Schema::create('bars', function ($collection) {
...
@@ -1023,7 +1022,7 @@ Schema::create('bars', function ($collection) {
Extending
Extending
---------
---------
### Cross-Database Relations
### Cross-Database Relationships
If you're using a hybrid MongoDB and SQL setup, you can define relationships across them.
If you're using a hybrid MongoDB and SQL setup, you can define relationships across them.