app/Api/V1/Controllers/GoodController.php
/**
     * validate that given categories (comma seperated) are in db
     * @param string $categoriesString
     * @return bool|\Illuminate\Support\Collection
     */
validate that given categories (comma seperated) are in db
@param string $categoriesString
@return bool|\Illuminate\Support\Collection
validate that given categories ( comma seperated ) are in db @param string $categoriesString @return bool| \ Illuminate \ Support \ Collection
protected function validateCategory(string $categoriesString)
    {
        $categories = $this->getCategoriesFromString($categoriesString);
        if ($category_ids = (new Category)->areValidCategories($categories)) {
            return $category_ids;
        }
        return false;
    }
protected function validateCategory ( string $ categoriesString ) { $ categories = $ this -> getCategoriesFromString ( $ categoriesString ) ; if ( $ category_ids = ( new Category ) -> areValidCategories ( $ categories ) ) { return $ category_ids ; } return false ; }
validate that given categories (comma seperated) are in db
 @param string $categoriesString
 @return bool|\Illuminate\Support\Collection
validate that given categories ( comma seperated ) are in db @param string $categoriesString @return bool| \ Illuminate \ Support \ Collection