Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

How to use DomainParser facade? #25

Open
jordanade opened this issue Jan 14, 2023 · 2 comments
Open

How to use DomainParser facade? #25

jordanade opened this issue Jan 14, 2023 · 2 comments
Labels
enhancement New feature or request question Further information is requested

Comments

@jordanade
Copy link

Please provide examples.

@kevindierkx kevindierkx added enhancement New feature or request question Further information is requested labels Jan 16, 2023
@kevindierkx
Copy link
Owner

Hi! Anything specific you would like to know about?

Even though this issue is related to #24, I'll leave it open until fixed.

@jordanade
Copy link
Author

Thank you Kevin. The idea of using the resolve() method on what is presented as a "list" object wasn't obvious at all. Finally figured it out by cross-referencing the PDP documentation. I'll leave this here for others:

$pdp = app('pdp.rules')->resolve($raw_domain);
$registrable_domain = $pdp->registrableDomain()->toString();
$tld = $pdp->suffix()->toString();

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
enhancement New feature or request question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants