Skip to content

Commit ef774e2

Browse files
author
Chris Cho
committed
DOCSP-37056: Eloquent relationships
1 parent b1ab9dc commit ef774e2

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
.. _laravel-eloquent-model-relationships:
2+
3+
============================
4+
Eloquent Model Relationships
5+
============================
6+
7+
.. facet::
8+
:name: genre
9+
:values: tutorial
10+
11+
.. meta::
12+
:keywords: php framework, odm, code example
13+
14+
Relationships
15+
-------------
16+
17+
This section describes each of the Laravel Eloquent and MongoDB-specific
18+
relationships that you can use and provides examples for hasOne, hasMany,
19+
belongsTo, belongsToMany, embedsOne, and embedsMany.
20+
21+
22+
{+odm-short+} supports the following Eloquent relationships:
23+
24+
- hasOne
25+
- hasMany
26+
- belongsTo
27+
- belongsToMany
28+
29+
30+
It also supports the following
31+
32+
33+
34+
Each example will show, when applicable, how to define the relationships,
35+
access the related models, save/create, destroy/delete, and associate/disassociate.
36+
37+
38+

0 commit comments

Comments
 (0)