protected function loadTags() { $query = Tag::with('posts'); if (!$this->property('emptyTag')) { $query->has('posts', '>=', '1'); } if ($take = intVal($this->property('results'))) { $query->take($take); } $query->listTags($this->property('sortOrder')); return $query->get(); }