Skip to content

Commit 8806fe5

Browse files
committed
# This is a combination of 3 commits.
# This is the 1st commit message: fix(pivot): only use unique classes in the pivot union (Fixes #1606) improve comment composer fix-style use a safer method # This is the commit message #2: unshift is better than rest # This is the commit message #3: composer fix-style # This is a combination of 3 commits. # This is the 1st commit message: fix(pivot): only use unique classes in the pivot union (Fixes #1606) improve comment composer fix-style use a safer method # This is the commit message #2: unshift is better than rest # This is the commit message #3: composer fix-style
1 parent 4a2bbaf commit 8806fe5

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/Console/ModelsCommand.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -730,6 +730,7 @@ public function getPropertiesFromMethods($model)
730730

731731
if ($existingPivot = ($this->properties[$relationObj->getPivotAccessor()] ?? null)) {
732732
$existingClasses = explode('|', $existingPivot['type']);
733+
733734
if(!in_array($pivot, $existingClasses)) {
734735
array_unshift($existingClasses, $pivot);
735736
}

0 commit comments

Comments
 (0)