Skip to content

Commit

Permalink
fix relation
Browse files Browse the repository at this point in the history
  • Loading branch information
summerblue committed Oct 26, 2017
1 parent 4a14663 commit 8a4fea2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Expand Up @@ -32,8 +32,8 @@ public function build()
$relatedModel = $relationship->getRelated();

$options['table'] = $relationship->getTable();
$options['column'] = $relationship->getForeignKey();
$options['column2'] = $relationship->getOtherKey();
$options['column'] = $relationship->getQualifiedForeignPivotKeyName();
$options['column2'] = $relationship->getQualifiedRelatedPivotKeyName();
$options['foreign_key'] = $relatedModel->getKeyName();

$this->suppliedOptions = $options;
Expand Down
Expand Up @@ -30,7 +30,7 @@ public function build()
$related_model = $relationship->getRelated();

$options['table'] = $related_model->getTable();
$options['column'] = $relationship->getPlainForeignKey();
$options['column'] = $relationship->getQualifiedForeignKeyName();

$this->suppliedOptions = $options;
}
Expand Down

0 comments on commit 8a4fea2

Please sign in to comment.