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.
2 parents 924735e + 38344c3 commit 0c864d0Copy full SHA for 0c864d0
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
+ } else if (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