Skip to content

Commit

Permalink
Merge pull request #121 from franzose/3.x
Browse files Browse the repository at this point in the history
fixed #82, added basic ascending ordering to getTree method
  • Loading branch information
franzose committed May 18, 2014
2 parents 4a3929e + 925aa59 commit a9d7adb
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 a9d7adb

Please sign in to comment.