zenstruck/uri
Immutable, fluent URI/URL value objects for PHP with easy parsing, building, and modification of URIs. Create, normalize, and manipulate components (scheme, host, path, query, fragment) safely, with helpers for encoding and query params.
parse_url() usage).http:// to https://).Adopt If:
Uri::create()->withQuery(['utm_source' => 'email'])).parse_url()/parse_str().javascript:).Illuminate\Support\Uri is desired (this package extends it).Look Elsewhere If:
For Executives:
"This package lets us treat URLs as first-class objects—like dates or money—reducing bugs in links, redirects, and APIs. For example, instead of fragile string concatenation for tracking pixels (?utm_source=email), we’d use Uri::create()->withQuery(['utm_source' => 'email'])—cleaner, safer, and reusable. It’s a 10-minute integration that saves hours of debugging malformed URLs, especially critical for SEO tools or multi-service architectures. MIT-licensed and actively maintained, with zero vendor lock-in."
For Engineering: *"Zenstruck/Uri gives us:
Uri::create()->withPath('/new')->withFragment('section').data:) or missing TLDs.Uri class.How can I help you explore Laravel packages today?