{"id":22147541,"url":"https://github.com/myerscode/laravel-domain-validator","last_synced_at":"2026-01-12T06:42:25.032Z","repository":{"id":237722899,"uuid":"795135431","full_name":"myerscode/laravel-domain-validator","owner":"myerscode","description":"Validate Domains names in Laravel using PHP Domain Parser.","archived":false,"fork":false,"pushed_at":"2024-09-23T19:41:59.000Z","size":114,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-11-22T18:11:39.957Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/myerscode.png","metadata":{"files":{"readme":"readme.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-05-02T16:48:21.000Z","updated_at":"2024-09-23T19:42:03.000Z","dependencies_parsed_at":"2024-05-08T22:25:03.546Z","dependency_job_id":"07551f60-37e9-4385-a54e-304911bfbd48","html_url":"https://github.com/myerscode/laravel-domain-validator","commit_stats":null,"previous_names":["myerscode/laravel-domain-validator"],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/myerscode%2Flaravel-domain-validator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/myerscode%2Flaravel-domain-validator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/myerscode%2Flaravel-domain-validator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/myerscode%2Flaravel-domain-validator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/myerscode","download_url":"https://codeload.github.com/myerscode/laravel-domain-validator/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":227642172,"owners_count":17797850,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-01T23:18:19.088Z","updated_at":"2026-01-12T06:42:24.999Z","avatar_url":"https://github.com/myerscode.png","language":"PHP","readme":"# Laravel Domain Validator\n\u003e A Laravel package for validating domain properties\n\n[![Latest Stable Version](https://poser.pugx.org/myerscode/laravel-domain-validator/v/stable)](https://packagist.org/packages/myerscode/laravel-domain-validator)\n[![Total Downloads](https://poser.pugx.org/myerscode/laravel-domain-validator/downloads)](https://packagist.org/packages/myerscode/laravel-domain-validator)\n[![License](https://poser.pugx.org/myerscode/laravel-domain-validator/license)](https://packagist.org/packages/myerscode/laravel-domain-validator)\n![Tests](https://github.com/myerscode/laravel-domain-validator/actions/workflows/tests.yml/badge.svg?branch=main)\n[![codecov](https://codecov.io/gh/myerscode/laravel-domain-validator/graph/badge.svg?token=YR0YHVERNV)](https://codecov.io/gh/myerscode/laravel-domain-validator)\n## Why is this useful?\n\nIt allows easy integration of the [PHP Domain Parser](https://github.com/jeremykendall/php-domain-parser) PHP Domain Parser \nby [Jeremy Kendall](https://github.com/jeremykendall) into a Laravel app, in order to validate values against known \n\n## Installation\n\nThe package can be installed via composer:\n\n```bash\ncomposer require myerscode/laravel-domain-validator\n```\n\n## Usage\n\nFetch data sets\n```php\nartisan domain-validator:cache\n```\n\nCache the fetched data sets\n```php\nartisan domain-validator:cache\n```\n\nDo both together!\n```php\nartisan domain-validator:refresh\n```\n\n## Scheduling\n\nIt is recommended to schedule the refresh command, in order to remove the need of running the `domain-validator:refresh` command\nevery time you need to update your cache.\n\nKeeping the sources of truth (the )\n\n```php\n// routes/console.php\n\nSchedule::call('domain-validator:refresh')-\u003edaily();\n\n// alternatively initialize a new command class\n\nSchedule::call(new \\Myerscode\\Laravel\\DomainValidator\\Commands\\RefreshCommand)-\u003edaily();\n```\n\n## Checks\n\nNote: For developer experience, all strings passed will be sanitized to remove trailing slashes `/` and `http(s)://`.\n\nIs the value recognized valid a valid TLD suffix recognized by the Internet Corporation for Assigned Names and\nNumbers (ICANN) as....\n\n### Has ICANN Suffix\n\u003e Tells whether the effective TLD has a matching rule in a Public Suffix List ICANN Section.\n\n```php\nhasICANNSuffix('myerscode.com') // true\n\nhasICANNSuffix('cloudfront.net') // false\n```\n\n### Has Known Suffix\n\u003e Tells whether the effective TLD has a matching rule in a Public Suffix List.\n\nFor more information i go to the [Public Suffix section](#public-suffix)\n\n```php\nhasKnownSuffix('myerscode.co') // true\n\nhasKnownSuffix('myerscode.corgi') // false\n```\n\n### Has Private Suffix\n\u003e Tells whether the effective TLD has a matching rule in a Public Suffix List Private Section.\n\n```php\nhasPrivateSuffix('myerscode.cloudfront.net') // true\n\nhasPrivateSuffix('cloudfront.net') // false\n```\n\n### Is Domain\n\u003e Is the value parseable as to a valid domain\n\n```php\nisDomain('myerscode.com') // true\n\nisDomain('.com') // false\n```\n\n### Is TLD\n\u003e Is the value a valid Top Level Domain\n\n```php\nisTld('.com') // true\n\nisTld('.corgi') // false\n```\n\n## Issues\n\nBug reports and feature requests can be submitted on the [Github Issue Tracker](https://github.com/myerscode/laravel-domain-validator/issues).\n\n## Contributing\n\nWe are very happy to receive pull requests to add functionality or fixes. Please read the Myerscode [contributing](https://github.com/myerscode/docs/blob/main/CONTRIBUTING.md) guide for information.\n\n## License\n\nThe MIT License (MIT). Please see [License File](LICENSE) for more information.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmyerscode%2Flaravel-domain-validator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmyerscode%2Flaravel-domain-validator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmyerscode%2Flaravel-domain-validator/lists"}