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

    if (is_null($vocabulary)) {
      return [];
    }

    $parents = $this->term->whereParent(0)
      ->whereVocabularyId($vocabulary->id)
      ->orderBy('weight', 'ASC')
      ->get();

    $options = [];
    foreach ($parents as $parent) {
      $options[$parent->id] = $parent->name;
      $this->recurse_children($parent, $options);
    }

    return $options;
  }