Below, you'll find a list of methods available, which is used in the Country model to help you query countries based on their domain information.
These methods allow you to filter countries by their top-level domains (TLDs) and alternative TLDs.
Find countries that have a specific top-level domain (TLD).
->whereDomain(string $domain)
Country::whereDomain('.us')->get();
Find countries that have any of the specified top-level domains.
->whereDomains(array $domains)
Country::whereDomains(['.uk', '.fr', '.de'])->get();
Find countries that have a specific alternative top-level domain (alternative TLD).
->whereDomainAlternative(string $domains)
Country::whereDomainAlternative('.us')->get();
Find countries that have any of the specified alternative top-level domains (alternative TLDs).
->whereDomainsAlternative(array $domains)
Country::whereDomainsAlternative(['.uk', '.fr', '.de'])->get();
How can I help you explore Laravel packages today?