layershifter/tld-extract
Lightweight PHP library that extracts the top-level domain, domain name, and subdomain from URLs and email addresses using an accurate public suffix list. Simple static API returns structured results, making it easy to validate and parse domains in any Laravel or plain PHP project.
TLDExtract is a lightweight PHP library for accurately parsing domains using the official Public Suffix List. It extracts the top-level domain, registrable domain, and subdomain from any URL or hostname, correctly handling complex multi-part suffixes like co.uk and github.io.
How can I help you explore Laravel packages today?