public function makeChildOf(CategoryInterface $category)
    {
        $this->save();
        $this->parents()->sync(array($category->getKey()));

        return $this;
    }
public function makeChildOf(CategoryInterface $category)
    {
        $this->save();
        $this->parents()->sync(array($category->getKey()));

        return $this;
    }
public function makeChildOf ( CategoryInterface $ category ) { $ this -> save ( ) ; $ this -> parents ( ) -> sync ( array ( $ category -> getKey ( ) ) ) ; return $ this ; }
Make new category into some parent.

@param  CategoryInterface $category
@return object
Make new category into some parent .