public function removeTerms($vocabulary_id = null)
    {
        if ($vocabulary_id === null) {
            return $this->getTaxonomyQuery()->delete();
        }

        if (!is_numeric($vocabulary_id)) {
            $vocabulary_id = T::vocabulary($vocabulary_id);
        }

        return $this->getTaxonomyQuery()->whereIn('term_id', function ($query) use ($vocabulary_id) {
            $query->select('id')->where('vocabulary_id', $vocabulary_id)->from((new TermContainer)->getTable());
        })->delete();
    }
public function removeTerms($vocabulary_id = null)
    {
        if ($vocabulary_id === null) {
            return $this->getTaxonomyQuery()->delete();
        }

        if (!is_numeric($vocabulary_id)) {
            $vocabulary_id = T::vocabulary($vocabulary_id);
        }

        return $this->getTaxonomyQuery()->whereIn('term_id', function ($query) use ($vocabulary_id) {
            $query->select('id')->where('vocabulary_id', $vocabulary_id)->from((new TermContainer)->getTable());
        })->delete();
    }
public function removeTerms ( $ vocabulary_id = null ) { if ( $ vocabulary_id === null ) { return $ this -> getTaxonomyQuery ( ) -> delete ( ) ; } if ( ! is_numeric ( $ vocabulary_id ) ) { $ vocabulary_id = T :: vocabulary ( $ vocabulary_id ) ; } return $ this -> getTaxonomyQuery ( ) -> whereIn ( 'term_id' , function ( $ query ) use ( $ vocabulary_id ) { $ query -> select ( 'id' ) -> where ( 'vocabulary_id' , $ vocabulary_id ) -> from ( ( new TermContainer ) -> getTable ( ) ) ; } ) -> delete ( ) ; }
Removes terms specified by a vocabulary, or all

@param int|string $vocabulary_id
@return bool
Removes terms specified by a vocabulary or all