/** * Make new category into some parent. * * @param CategoryInterface $category * @return object */ public function makeChildOf(Node $node) { $this->save(); $this->parents()->sync(array($node->getKey())); return $this; }