src/Services/NestableService.php
public function parent($parent = false)
    {
        if ($parent) {
            $this->parents = !is_array($parent) ? [$parent] : $parent;

            if (func_num_args() > 1) {
                $this->parents = func_get_args();
            }
        }

        return $this;
    }
public function parent($parent = false)
    {
        if ($parent) {
            $this->parents = !is_array($parent) ? [$parent] : $parent;

            if (func_num_args() > 1) {
                $this->parents = func_get_args();
            }
        }

        return $this;
    }
public function parent ( $ parent = false ) { if ( $ parent ) { $ this -> parents = ! is_array ( $ parent ) ? [ $ parent ] : $ parent ; if ( func_num_args ( ) > 1 ) { $ this -> parents = func_get_args ( ) ; } } return $ this ; }
Set the parent id for child elements.

@param int $parent

@return object (instance)
Set the parent id for child elements .