src/Traits/HasTaxonomies.php
public function removeTerm($term_name, $taxonomy = '')
    {
        if (! $term = $this->getTerm($term_name, $taxonomy))
            return null;

        if ($taxonomy) {
            $taxonomy = $this->taxonomies->where('taxonomy', $taxonomy)->where('term_id', $term->id)->first();
        } else {
            $taxonomy = $this->taxonomies->where('term_id', $term->id)->first();
        }

        return $this->taxed()->where('taxonomy_id', $taxonomy->id)->delete();
    }
public function removeTerm($term_name, $taxonomy = '')
    {
        if (! $term = $this->getTerm($term_name, $taxonomy))
            return null;

        if ($taxonomy) {
            $taxonomy = $this->taxonomies->where('taxonomy', $taxonomy)->where('term_id', $term->id)->first();
        } else {
            $taxonomy = $this->taxonomies->where('term_id', $term->id)->first();
        }

        return $this->taxed()->where('taxonomy_id', $taxonomy->id)->delete();
    }
public function removeTerm ( $ term_name , $ taxonomy = '' ) { if ( ! $ term = $ this -> getTerm ( $ term_name , $ taxonomy ) ) return null ; if ( $ taxonomy ) { $ taxonomy = $ this -> taxonomies -> where ( 'taxonomy' , $ taxonomy ) -> where ( 'term_id' , $ term -> id ) -> first ( ) ; } else { $ taxonomy = $ this -> taxonomies -> where ( 'term_id' , $ term -> id ) -> first ( ) ; } return $ this -> taxed ( ) -> where ( 'taxonomy_id' , $ taxonomy -> id ) -> delete ( ) ; }
Disassociate the given term from this model.

@param  string  $term_name
@param  string  $taxonomy
@return mixed
Disassociate the given term from this model .