Skip to content

Commit

Permalink
Merge pull request #160 from JaxxC/patch-1
Browse files Browse the repository at this point in the history
remove hardcoded column names 'parent_id' and 'position'
  • Loading branch information
franzose committed Dec 25, 2015
2 parents 77f57db + e036bf9 commit 789cba7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Franzose/ClosureTable/Models/Entity.php
Original file line number Diff line number Diff line change
Expand Up @@ -1106,7 +1106,7 @@ public static function getTree(array $columns = ['*'])
*/
$instance = new static;

return $instance->orderBy('parent_id')->orderBy('position')
return $instance->orderBy($instance->getParentIdColumn())->orderBy($instance->getPositionColumn())
->get($instance->prepareTreeQueryColumns($columns))->toTree();
}

Expand Down

0 comments on commit 789cba7

Please sign in to comment.