public function getVocabularyByNameAsArray($name) {
    $vocabulary = $this->vocabulary->where('name', $name)->first();

    if (!is_null($vocabulary)) {
      return $vocabulary->terms->pluck('name', 'id')->toArray();
    }

    return [];
  }
public function getVocabularyByNameAsArray($name) {
    $vocabulary = $this->vocabulary->where('name', $name)->first();

    if (!is_null($vocabulary)) {
      return $vocabulary->terms->pluck('name', 'id')->toArray();
    }

    return [];
  }
public function getVocabularyByNameAsArray ( $ name ) { $ vocabulary = $ this -> vocabulary -> where ( 'name' , $ name ) -> first ( ) ; if ( ! is_null ( $ vocabulary ) ) { return $ vocabulary -> terms -> pluck ( 'name' , 'id' ) -> toArray ( ) ; } return [ ] ; }
Get a Vocabulary by name

@param string $name
The name of the Vocabulary to fetch

@return
The Vocabulary Model object, otherwise NULL
Get a Vocabulary by name