public function is_empty() { $query = Query::create('{terms}')->select('count(id)'); $query->where()->in('vocabulary_id', $this->id); return (int) $query->value() == 0; }