Skip to content

Commit abeaa5c

Browse files
authored
Add morphToMany to be able to use relation sort (#642)
1 parent 3a05e34 commit abeaa5c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Database/Traits/SortableRelation.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ public function initializeSortableRelation()
6262
*/
6363
protected function defineSortableRelations()
6464
{
65-
$interactsWithPivot = ['belongsToMany'];
65+
$interactsWithPivot = ['belongsToMany', 'morphToMany'];
6666
$sortableRelations = [];
6767

6868
foreach ($interactsWithPivot as $type) {

0 commit comments

Comments
 (0)