8000 [Docs] Update relationships in adapter chapter · dev-engvox/laravel-json-api@98f192b · GitHub
[go: up one dir, main page]

Skip to content

Commit 98f192b

Browse files
committed
[Docs] Update relationships in adapter chapter
Closes cloudcreativity#505
1 parent c142b29 commit 98f192b

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

docs/basics/adapters.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,8 @@ for Eloquent models. The relationship types available are `belongsTo`, `hasOne`,
233233
| `morphOne` | `hasOne` |
234234
| `morphMany` | `hasMany` |
235235
| `morphToMany` | `hasMany` |
236-
| `morphedByMany` | `morphMany` |
236+
| `morphedByMany` | `hasMany` |
237+
| n/a | `morphMany` |
237238
| n/a | `queriesOne` |
238239
| n/a | `queriesMany` |
239240

@@ -380,8 +381,8 @@ class Adapter extends AbstractAdapter
380381

381382
#### Morph-Many
382383

383-
Use the JSON API `morphMany` relation for an Eloquent `morphedByMany` relation. The `morphMany` relation in effect
384-
*mixes* multiple different JSON API resource relationships in a single relationship.
384+
Use the JSON API `morphMany` relation to *mix* multiple different JSON API resource relationships in a single
385+
relationship.
385386

386387
This is best demonstrated with an example. If our application has a `tags` resource that can be linked to either
387388
`videos` or `posts`, our `tags` adapter would define a `taggables` relation as follows:

0 commit comments

Comments
 (0)
0