Skip to content

Commit

Permalink
Change method names for getting ForeignKey
Browse files Browse the repository at this point in the history
  • Loading branch information
Kyslik committed Jan 24, 2017
1 parent d190320 commit 9144084
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ColumnSortable/Sortable.php
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ private function queryJoinBuilder($query, $relation)


if ($relation instanceof HasOne) {
$relatedPrimaryKey = $relation->getForeignKey();
$relatedPrimaryKey = $relation->getQualifiedForeignKeyName();
$parentPrimaryKey = $parentTable . '.' . $parentModel->primaryKey;
return $query->select($parentTable . '.*')->join($relatedTable, $parentPrimaryKey, '=', $relatedPrimaryKey);
} elseif ($relation instanceof BelongsTo) {
Expand Down

0 comments on commit 9144084

Please sign in to comment.