private function createTreeArray()
    {
        $tree = [];

        foreach($this->models as $model) {
            $tree[] = [
                'id' => $model->{$this->id},
                'parent_id' => $model->{$this->parent_id},
                'model' => $model,
            ];
        }

        return $tree;
    }