From 678dd2eaa42b00a713f06c4e776c0cf5592b3dc9 Mon Sep 17 00:00:00 2001 From: Igor Santos Date: Mon, 30 Nov 2015 12:39:46 -0200 Subject: [PATCH] Adding support for HasManyThrough::localKey --- src/Ardent/Ardent.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Ardent/Ardent.php b/src/Ardent/Ardent.php index c13da5e..4659181 100755 --- a/src/Ardent/Ardent.php +++ b/src/Ardent/Ardent.php @@ -334,8 +334,8 @@ protected function handleRelationalArray($relationName) { return $this->$relationType($relation[1], $relation['foreignKey'], $relation['localKey']); case self::HAS_MANY_THROUGH: - $verifyArgs(['firstKey', 'secondKey'], ['through']); - return $this->$relationType($relation[1], $relation['through'], $relation['firstKey'], $relation['secondKey']); + $verifyArgs(['firstKey', 'secondKey', 'localKey'], ['through']); + return $this->$relationType($relation[1], $relation['through'], $relation['firstKey'], $relation['secondKey'], $relation['localKey']); case self::BELONGS_TO: $verifyArgs(['foreignKey', 'otherKey', 'relation']);