Skip to content

Commit 3bd943a

Browse files
author
phailee
committed
Fix: hasMany relation bug (call relation on relation) fix
1 parent 681da4b commit 3bd943a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/RequestParser.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -429,7 +429,7 @@ private function parseFields($fields)
429429
$singular = $relation->getForeignKey();
430430
}
431431
else if ($relation instanceof HasOne || $relation instanceof HasMany) {
432-
$singular = explode('.', $relation->getForeignKey())[1];
432+
$singular = $relation->getForeignKeyName();
433433
}
434434

435435
// Unset last element of array

0 commit comments

Comments
 (0)