Skip to content

Commit

Permalink
fixed #82, added basic ascending ordering to getTree method
Browse files Browse the repository at this point in the history
  • Loading branch information
franzose committed May 18, 2014
1 parent 0b6cede commit 925aa59
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Franzose/ClosureTable/Models/Entity.php
Original file line number Diff line number Diff line change
Expand Up @@ -1127,7 +1127,8 @@ public static function getTree(array $columns = ['*'])
*/
$instance = new static;

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

/**
Expand Down

0 comments on commit 925aa59

Please sign in to comment.