where('type', $type); } public function parentId($parentId){ return $this->where('parent_id', $parentId); } }