public static function create($name)
    {
        $title = Inflector::titleize($name, true);
        $slug = Inflector::slug($name);
        $model = new self(['name' => $slug, 'title' => $title, 'status_id' => self::STATUS_ENABLED]);

        if ($model->save()) {
            return $model;
        } else {
            throw new ErrorException(implode(' ', $model->getFirstErrors()));
        }
    }
public static function create($name)
    {
        $title = Inflector::titleize($name, true);
        $slug = Inflector::slug($name);
        $model = new self(['name' => $slug, 'title' => $title, 'status_id' => self::STATUS_ENABLED]);

        if ($model->save()) {
            return $model;
        } else {
            throw new ErrorException(implode(' ', $model->getFirstErrors()));
        }
    }
public static function create ( $ name ) { $ title = Inflector :: titleize ( $ name , true ) ; $ slug = Inflector :: slug ( $ name ) ; $ model = new self ( [ 'name' => $ slug , 'title' => $ title , 'status_id' => self :: STATUS_ENABLED ] ) ; if ( $ model -> save ( ) ) { return $ model ; } else { throw new ErrorException ( implode ( ' ' , $ model -> getFirstErrors ( ) ) ) ; } }
Creates taxonomy vocabulary by name
@param $name
@return TaxonomyVocabulary
@throws ErrorException
Creates taxonomy vocabulary by name