src/Franzose/ClosureTable/Models/Entity.php
public function removeChildren($from, $to = null, $forceDelete = false)
    {
        if (!is_numeric($from) || (!is_null($to) && !is_numeric($to))) {
            throw new \InvalidArgumentException('`from` and `to` are the position boundaries. They must be of type int.');
        }

        if ($this->exists) {
            $action = ($forceDelete === true ? 'forceDelete' : 'delete');

            $this->children([$from, $to])->$action();
        }

        return $this;
    }
public function removeChildren($from, $to = null, $forceDelete = false)
    {
        if (!is_numeric($from) || (!is_null($to) && !is_numeric($to))) {
            throw new \InvalidArgumentException('`from` and `to` are the position boundaries. They must be of type int.');
        }

        if ($this->exists) {
            $action = ($forceDelete === true ? 'forceDelete' : 'delete');

            $this->children([$from, $to])->$action();
        }

        return $this;
    }
public function removeChildren ( $ from , $ to = null , $ forceDelete = false ) { if ( ! is_numeric ( $ from ) || ( ! is_null ( $ to ) && ! is_numeric ( $ to ) ) ) { throw new \ InvalidArgumentException ( '`from` and `to` are the position boundaries. They must be of type int.' ) ; } if ( $ this -> exists ) { $ action = ( $ forceDelete === true ? 'forceDelete' : 'delete' ) ; $ this -> children ( [ $ from , $ to ] ) -> $ action ( ) ; } return $ this ; }
Removes model's children within a range of positions.

@param int $from
@param int $to
@param bool $forceDelete
@return $this
@throws \InvalidArgumentException
Removes model s children within a range of positions .