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 1743354 commit 02d6bc5Copy full SHA for 02d6bc5
src/Parser.php
@@ -391,7 +391,10 @@ protected function parseWith($withParam)
391
$firstKey = $relation->getQualifiedParentKeyName();
392
$secondKey = $relation->getRelated()->getQualifiedKeyName();
393
} else if ($relationType === 'HasManyThrough') {
394
- if (method_exists($relation, 'getExistenceCompareKey')) {
+ if (method_exists($relation, 'getQualifiedLocalKeyName')) {
395
+ $firstKey = $relation->getQualifiedLocalKeyName();
396
+ } elseif (method_exists($relation, 'getExistenceCompareKey')) {
397
+ // compatibility for laravel 5.4
398
$firstKey = $relation->getExistenceCompareKey();
399
} else {
400
// compatibility for laravel < 5.4
0 commit comments