/** * Overriding newQuery() to the custom TermTaxonomyBuilder with some interesting methods * * @param bool $excludeDeleted * @return Corcel\TermTaxonomyBuilder */ public function newQuery($excludeDeleted = true) { $builder = new TermTaxonomyBuilder($this->newBaseQueryBuilder()); $builder->setModel($this)->with($this->with); if (isset($this->taxonomy) and !empty($this->taxonomy) and !is_null($this->taxonomy)) { $builder->where('taxonomy', $this->taxonomy); } return $builder; }