src/Press/Models/Category.php
public function setParent($parent_id = null): self
    {
        $parent_id = ((int) $parent_id > 0) ? (int) $parent_id : null;

        $this->setAttribute('parent_id', $parent_id);

        return $this;
    }
public function setParent($parent_id = null): self
    {
        $parent_id = ((int) $parent_id > 0) ? (int) $parent_id : null;

        $this->setAttribute('parent_id', $parent_id);

        return $this;
    }
public function setParent ( $ parent_id = null ) : self { $ parent_id = ( ( int ) $ parent_id > 0 ) ? ( int ) $ parent_id : null ; $ this -> setAttribute ( 'parent_id' , $ parent_id ) ; return $ this ; }
Set parent category.

@param int|null $parent_id

@return self
Set parent category .