diff --git a/src/Franzose/ClosureTable/Models/Entity.php b/src/Franzose/ClosureTable/Models/Entity.php index d10db73..84a6f94 100644 --- a/src/Franzose/ClosureTable/Models/Entity.php +++ b/src/Franzose/ClosureTable/Models/Entity.php @@ -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(); } /**