@@ -78,7 +78,6 @@ If you are using a different database driver as the default one, you will need t
...
@@ -78,7 +78,6 @@ If you are using a different database driver as the default one, you will need t
Everything else works just like the original Eloquent model. Read more about the Eloquent on http://laravel.com/docs/eloquent
Everything else works just like the original Eloquent model. Read more about the Eloquent on http://laravel.com/docs/eloquent
### Optional: Alias
### Optional: Alias
-------------------
You may also register an alias for the MongoDB model by adding the following to the alias array in `app/config/app.php`:
You may also register an alias for the MongoDB model by adding the following to the alias array in `app/config/app.php`:
...
@@ -268,8 +267,6 @@ Supported relations are:
...
@@ -268,8 +267,6 @@ Supported relations are:
- belongsTo
- belongsTo
- belongsToMany
- belongsToMany
*The belongsToMany relation will not use a pivot "table", but will push id's to a **related_ids** attribute instead.*
Example:
Example:
use Jenssegers\Mongodb\Model as Eloquent;
use Jenssegers\Mongodb\Model as Eloquent;
...
@@ -296,6 +293,19 @@ And the inverse relation:
...
@@ -296,6 +293,19 @@ And the inverse relation:
}
}
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. If you want to define custom keys for your relation, set it to `null`:
Other relations are not yet supported, but may be added in the future. Read more about these relations on http://four.laravel.com/docs/eloquent#relationships
Other relations are not yet supported, but may be added in the future. Read more about these relations on http://four.laravel.com/docs/eloquent#relationships