Skip to content

Commit 7bf69af

Browse files
authored
Merge pull request #13 from phailee/5.6
Fix: hasMany relation bug (call relation on relation) fix
2 parents 3fa449a + 3bd943a commit 7bf69af

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)