You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+13-3Lines changed: 13 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -78,7 +78,6 @@ If you are using a different database driver as the default one, you will need t
78
78
Everything else works just like the original Eloquent model. Read more about the Eloquent on http://laravel.com/docs/eloquent
79
79
80
80
### Optional: Alias
81
-
-------------------
82
81
83
82
You may also register an alias for the MongoDB model by adding the following to the alias array in `app/config/app.php`:
84
83
@@ -268,8 +267,6 @@ Supported relations are:
268
267
- belongsTo
269
268
- belongsToMany
270
269
271
-
*The belongsToMany relation will not use a pivot "table", but will push id's to a **related_ids** attribute instead.*
272
-
273
270
Example:
274
271
275
272
use Jenssegers\Mongodb\Model as Eloquent;
@@ -296,6 +293,19 @@ And the inverse relation:
296
293
297
294
}
298
295
296
+
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
0 commit comments