We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f39e9f6 commit ae24548Copy full SHA for ae24548
src/RequestParser.php
@@ -428,7 +428,7 @@ private function parseFields($fields)
428
$fieldParts = explode(".", $fieldName);
429
430
if ($relation instanceof BelongsTo) {
431
- $singular = $relation->getOtherKey();
+ $singular = $relation->getForeignKey();
432
}
433
else if ($relation instanceof HasOne || $relation instanceof HasMany) {
434
$singular = explode('.', $relation->getForeignKey())[1];
@@ -456,6 +456,8 @@ private function parseFields($fields)
456
else {
457
$this->relations[$parent]["fields"][] = $singular;
458
459
+
460
+ \Log::debug($this->relations[$parent]);
461
462
463
0 commit comments