Skip to content

Commit 4c03ea8

Browse files
committed
Default value for ownerKey;
1 parent 423a706 commit 4c03ea8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Eloquent/HybridRelations.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ public function morphTo($name = null, $type = null, $id = null, $ownerKey = null
221221
$this->newQuery(),
222222
$this,
223223
$id,
224-
$ownerKey,
224+
$ownerKey ?: $this->getKeyName(),
225225
$type,
226226
$name,
227227
);

0 commit comments

Comments
 (0)