Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
Laravel Domain Parser

Laravel Domain Parser Laravel Package

bakame/laravel-domain-parser

Laravel wrapper around the PHP Domain Parser library. Easily resolve registrable domains, public suffixes, and subdomains using the Public Suffix List, with a service provider, facade, and validation rule for reliable domain handling in Laravel apps.

View on GitHub
Deep Wiki
Context7

Laravel package to ease the interation of PHP Domain parser

Frequently asked questions about Laravel Domain Parser
What is bakame/laravel-domain-parser used for in Laravel?
It is a Laravel wrapper around the PHP Domain Parser library. It helps resolve registrable domains, public suffixes, and subdomains using the Public Suffix List, and it provides Laravel integration such as a service provider, facade, and validation rule.
How do I install bakame/laravel-domain-parser in a Laravel app?
Install it with Composer using the package name bakame/laravel-domain-parser. Then verify any service provider registration, config publishing, and cache settings documented by the package. Because adoption is low, pin the package and underlying parser versions in composer.json.
Which Laravel and PHP versions does laravel-domain-parser support?
Check the laravel/framework and php constraints in the package composer.json before installing. The technical evaluation flags Laravel and PHP version compatibility as a key risk for this low-adoption package. Test the exact Laravel and PHP versions used by your application rather than assuming broad support.
How does laravel-domain-parser get and refresh the Public Suffix List?
The wrapper relies on the underlying PHP Domain Parser library and Public Suffix List data. Do not fetch PSL data at runtime during requests; use a scheduled refresh or deploy-time update path instead. Confirm whether this package exposes an artisan command or config option for PSL updates, and alert on refresh failures.
Does laravel-domain-parser support IDN and Unicode domains?
IDN and Unicode handling depends on the underlying parser and how you pass domains into it. The evaluation flags IDN and Unicode behavior as a risk area, so test real Unicode domains and punycode forms. Include IDN fixtures in your proof of concept before relying on it for routing or validation.
Can I use laravel-domain-parser for multi-tenant subdomain routing and cookie domains?
It can help extract registrable domains for tenant routing, cookie scoping, SSO domain checks, and analytics grouping. Treat it as a domain-parsing utility, not a security boundary or general validation layer. For tenant isolation, wrap it behind your own interface and test against your actual domain patterns.
Is there a validation rule for domains in this Laravel package?
The package provides a Laravel validation rule for reliable domain handling according to the overview. Verify its exact rule name and behavior in the package documentation and tests. Use it for domain format checks, but do not confuse it with authorization or security controls.
How should I test laravel-domain-parser before using it in production?
Start with a time-boxed spike in a non-critical path such as analytics grouping or display-only subdomain parsing. Compare outputs against the raw PHP Domain Parser and a fixture set covering ccTLDs, multi-level suffixes, IDNs, private suffixes, and malformed inputs. Add an internal adapter and feature flag before rolling it out more broadly.
What are the risks of using a low-adoption package like laravel-domain-parser?
The package has low adoption, with 26 stars and zero dependents reported in the evaluation. Maintenance, compatibility, and stale PSL data are the main risks, and incorrect parsing can affect tenant isolation, cookie domains, or access rules. Pin versions, monitor upstream releases, document ownership, and keep a fallback path.
What alternatives or fallback should I consider instead of laravel-domain-parser?
You can fall back to the underlying PHP Domain Parser library directly or evaluate a maintained alternative if vendor risk is too high. Keep an internal DomainParser interface so application code does not depend directly on this package. That makes migration or replacement less disruptive.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
robertmarney/lara-hierarchial-collections
simonschaufi/rule-doc-generator
emissaoja/emissaoja
blackbricksoftware/gravityforms-civicrm-form-processor
al-rahabi/fancy-crud
jinas/dhivatar-component
mltstephane/laravel-quality
bernskiold/laravel-talentlms
bernskioldmedia/laravel-form-architect
youbar/easy-crud
c-point-labs/laravel-hostyourai
dbravoan/dbcms-admin-theme-dbcms
dbravoan/dbcms-theme-db-cyber
dbravoan/dbcms-blocks-basic
dbravoan/dbcms-module-content-audit
dbravoan/dbcms-module-ai-assistant
paygate-to/paygate-php
padosoft/askmydocs-connector-base
defstudio/supercharged-carbon
bernskioldmedia/laravel-matomo