Skip to content

Commit 3a775c2

Browse files
authored
Update eloquent-relationships.md
1 parent 92f0b2f commit 3a775c2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

eloquent-relationships.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,7 @@ You can also filter the results returned by `belongsToMany` using the `wherePivo
325325

326326
#### Defining Custom Intermediate Table Models
327327

328-
If you would like to define a custom model to represent the intermediate table of your relationship, you may call the `using` method when defining the relationship. All custom models used to represent intermediate tables of relationships must extend the `Illuminate\Database\Eloquent\Relations\Pivot` class. For example, we may define a `Role` which uses a custom `UserRole` pivot model:
328+
If you would like to define a custom model to represent the intermediate table of your relationship, you may call the `using` method when defining the relationship. Many to Many relationships should extend `Illuminate\Database\Eloquent\Relations\Pivot` and Many To Many Polymorphic relationships the `Illuminate\Database\Eloquent\Relations\MorphPivot` class. For example, we may define a `Role` which uses a custom `UserRole` pivot model:
329329

330330
<?php
331331

0 commit comments

Comments
 (0)