Skip to content
This repository was archived by the owner on Jul 16, 2023. It is now read-only.

Commit 678dd2e

Browse files
committed
Adding support for HasManyThrough::localKey
1 parent f6ad904 commit 678dd2e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Ardent/Ardent.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -334,8 +334,8 @@ protected function handleRelationalArray($relationName) {
334334
return $this->$relationType($relation[1], $relation['foreignKey'], $relation['localKey']);
335335

336336
case self::HAS_MANY_THROUGH:
337-
$verifyArgs(['firstKey', 'secondKey'], ['through']);
338-
return $this->$relationType($relation[1], $relation['through'], $relation['firstKey'], $relation['secondKey']);
337+
$verifyArgs(['firstKey', 'secondKey', 'localKey'], ['through']);
338+
return $this->$relationType($relation[1], $relation['through'], $relation['firstKey'], $relation['secondKey'], $relation['localKey']);
339339

340340
case self::BELONGS_TO:
341341
$verifyArgs(['foreignKey', 'otherKey', 'relation']);

0 commit comments

Comments
 (0)