/**
* Find categories by names,
* pass the name as an array.
*
* @param $name
* @throws CategoryNotFoundException
* @return mixed
*/
public function findByNames(array $name)
{
$category = $this->categoryRepo->findByNames($name);
if (count($category) == 0) {
$error = 'Category Not Found';
throw new CategoryNotFoundException($error);
}
return $category;
}