src/Traits/HasTaxonomies.php
public function getTerms($taxonomy = '')
    {
        if ($taxonomy) {
            $term_ids = $this->taxonomies->where('taxonomy', $taxonomy)->pluck('term_id');
        } else {
            $term_ids = $this->getTaxonomies('term_id');
        }

        return Term::whereIn('id', $term_ids)->get();
    }
public function getTerms($taxonomy = '')
    {
        if ($taxonomy) {
            $term_ids = $this->taxonomies->where('taxonomy', $taxonomy)->pluck('term_id');
        } else {
            $term_ids = $this->getTaxonomies('term_id');
        }

        return Term::whereIn('id', $term_ids)->get();
    }
public function getTerms ( $ taxonomy = '' ) { if ( $ taxonomy ) { $ term_ids = $ this -> taxonomies -> where ( 'taxonomy' , $ taxonomy ) -> pluck ( 'term_id' ) ; } else { $ term_ids = $ this -> getTaxonomies ( 'term_id' ) ; } return Term :: whereIn ( 'id' , $ term_ids ) -> get ( ) ; }
Get the terms related to a given taxonomy.

@param  string  $taxonomy
@return mixed
Get the terms related to a given taxonomy .