src/Franzose/ClosureTable/Models/Entity.php
protected function moveNode()
    {
        if ($this->exists) {
            if (is_null($this->closure->ancestor)) {
                $primaryKey = $this->getKey();
                $this->closure->ancestor = $primaryKey;
                $this->closure->descendant = $primaryKey;
                $this->closure->depth = 0;
            }

            if ($this->isDirty($this->getParentIdColumn())) {
                $this->reorderSiblings(true);
                $this->closure->moveNodeTo($this->parent_id);
            }
        }
    }
protected function moveNode()
    {
        if ($this->exists) {
            if (is_null($this->closure->ancestor)) {
                $primaryKey = $this->getKey();
                $this->closure->ancestor = $primaryKey;
                $this->closure->descendant = $primaryKey;
                $this->closure->depth = 0;
            }

            if ($this->isDirty($this->getParentIdColumn())) {
                $this->reorderSiblings(true);
                $this->closure->moveNodeTo($this->parent_id);
            }
        }
    }
protected function moveNode ( ) { if ( $ this -> exists ) { if ( is_null ( $ this -> closure -> ancestor ) ) { $ primaryKey = $ this -> getKey ( ) ; $ this -> closure -> ancestor = $ primaryKey ; $ this -> closure -> descendant = $ primaryKey ; $ this -> closure -> depth = 0 ; } if ( $ this -> isDirty ( $ this -> getParentIdColumn ( ) ) ) { $ this -> reorderSiblings ( true ) ; $ this -> closure -> moveNodeTo ( $ this -> parent_id ) ; } } }
Moves node to another ancestor.

@return void
Moves node to another ancestor .