diff --git a/src/QueryBuilder.php b/src/QueryBuilder.php index 61aba6a..7e73999 100644 --- a/src/QueryBuilder.php +++ b/src/QueryBuilder.php @@ -844,17 +844,17 @@ public function isBroken() * Nodes with invalid parent are saved as roots. * * @param null|NodeTrait|Model $root - * + * @param array $extraColumns * @return int The number of changed nodes */ - public function fixTree($root = null) + public function fixTree($root = null, array $extraColumns = []) { - $columns = [ + $columns = array_merge([ $this->model->getKeyName(), $this->model->getParentIdName(), $this->model->getLftName(), $this->model->getRgtName(), - ]; + ], $extraColumns); $dictionary = $this->model ->newNestedSetQuery()