public function add($params) { $category = new Category(); $category->setCategoryName($params['category_name'])->setEnabled(1)->setParentId(0); $response = $this->save($category); return $response; }