label)) ? (string) $c->label : (string) $c->name; if (!strlen($text) || in_array($text, $out)) { // if the category is blank or already in the output, skip it continue; } else { $out[] = $text; } } return $out; } /** Returns a collection filtered to include only the specified category domains */ public function filterForDomain(string ...$domain): self { return $this->filter($domain, "domain", true); } /** Returns a collection filtered to exclude the specified category domains */ public function filterOutDomain(string ...$domain): self { return $this->filter($domain, "domain", false); } }