src/Models/Taxonomy.php
public function scopeTerm($query, $term, $taxonomy = 'major')
    {
        return $query->whereHas('term', function($q) use($term, $taxonomy) {
            $q->where('name', $term);
        });
    }
public function scopeTerm($query, $term, $taxonomy = 'major')
    {
        return $query->whereHas('term', function($q) use($term, $taxonomy) {
            $q->where('name', $term);
        });
    }
public function scopeTerm ( $ query , $ term , $ taxonomy = 'major' ) { return $ query -> whereHas ( 'term' , function ( $ q ) use ( $ term , $ taxonomy ) { $ q -> where ( 'name' , $ term ) ; } ) ; }
Scope terms.

@param  object  $query
@param  string  $term
@param  string  $taxonomy
@return mixed
Scope terms .