PHPackages                             monovm/whois-laravel - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. monovm/whois-laravel

ActiveLibrary

monovm/whois-laravel
====================

Simple and fast domain whois lookup and availability checking for Laravel with a facade, config, caching and an artisan command.

00PHPCI passing

Since Aug 9Pushed todayCompare

[ Source](https://github.com/monovm/laravel-whois)[ Packagist](https://packagist.org/packages/monovm/whois-laravel)[ RSS](/packages/monovm-whois-laravel/feed)WikiDiscussions main Synced today

READMEChangelogDependenciesVersions (1)Used By (0)

⚡ Simple and Fast Domain Whois Lookup for Laravel ⚡
===================================================

[](#zap-simple-and-fast-domain-whois-lookup-for-laravel-zap)

Retrieve domain registration information and check domain availability via socket protocol — with a facade, publishable config, optional result caching and an artisan command.

📦 Requirements
--------------

[](#package-requirements)

- PHP 8.0 or higher
- Laravel 8, 9, 10, 11 or 12

📜 Installation
--------------

[](#scroll-installation)

You can install the package via composer:

```
composer require monovm/whois-laravel
```

The service provider and the `Whois` facade are registered automatically via package discovery.

Optionally publish the config file:

```
php artisan vendor:publish --tag=whois-config
```

🎓 Usage/Examples
----------------

[](#mortar_board-usageexamples)

### Checking availability

[](#checking-availability)

`Whois::check()` returns an associative array with domains as keys and statuses as values. Current statuses: `available`, `unavailable`, `premium`, `invalid`, `unknown`.

```
use MonoVM\WhoisLaravel\Facades\Whois;

// Single domain
$result1 = Whois::check('monovm.com');
// ['monovm.com' => 'unavailable']

// Single domain without specifying TLD — popular TLDs from the config are looked up
$result2 = Whois::check('monovm');
// ['monovm.com' => 'unavailable', 'monovm.net' => 'unavailable', 'monovm.org' => 'unavailable', 'monovm.info' => 'unavailable']

// Multiple domains
$result3 = Whois::check(['monovm', 'google.com', 'bing']);

// Custom popular TLDs for this call only
$result4 = Whois::check('monovm', ['popularTLDs' => ['.io', '.dev']]);
```

### Full whois lookup

[](#full-whois-lookup)

`Whois::lookup()` runs a full whois lookup for a single domain and returns a `WhoisResult` DTO:

```
use MonoVM\WhoisLaravel\Facades\Whois;

$result = Whois::lookup('monovm.com');

$result->domain;    // "monovm.com"
$result->sld;       // "monovm"
$result->tld;       // ".com"
$result->valid;     // true  — the domain can be looked up
$result->available; // false — availability via enhanced detection
$result->message;   // the whois server message
$result->toArray(); // array representation, also JsonSerializable
```

### Shortcuts

[](#shortcuts)

```
use MonoVM\WhoisLaravel\Facades\Whois;

// Availability as a boolean
if (Whois::isAvailable('monovm.com')) {
    // ...
}

// Raw whois handler (never cached)
$handler = Whois::handler('monovm.com');
$handler->getAvailabilityDetails(); // debug info about the availability detection
```

### Dependency injection

[](#dependency-injection)

Prefer injection over the facade? Type-hint the service:

```
use MonoVM\WhoisLaravel\WhoisService;

public function __invoke(WhoisService $whois)
{
    $status = $whois->check('monovm.com');
}
```

🔥 Artisan command
-----------------

[](#fire-artisan-command)

```
php artisan whois:lookup monovm.com google.com

# +------------+-------------+
# | Domain     | Status      |
# +------------+-------------+
# | monovm.com | unavailable |
# | google.com | premium     |
# +------------+-------------+

php artisan whois:lookup monovm.com --json
# {
#     "monovm.com": "unavailable"
# }
```

⚙️ Configuration
----------------

[](#gear-configuration)

`config/whois.php`:

```
return [
    // Looked up when a domain is checked without a TLD (eg: "monovm")
    'popular_tlds' => ['.com', '.net', '.org', '.info'],

    // Whois servers rate-limit aggressively; enable caching to serve
    // repeated lookups for the same domain from the cache.
    'cache' => [
        'enabled' => env('WHOIS_CACHE_ENABLED', false),
        'store' => env('WHOIS_CACHE_STORE'),   // null = default cache store
        'ttl' => env('WHOIS_CACHE_TTL', 300),  // seconds
        'prefix' => 'whois:',
    ],
];
```

Caching applies to `check()` and `lookup()`. `handler()` always performs a live lookup.

🧪 Testing
---------

[](#test_tube-testing)

```
composer test
```

The package ships a `MonoVM\WhoisLaravel\Contracts\Client` binding you can swap in your own tests to avoid real network lookups:

```
$this->app->instance(\MonoVM\WhoisLaravel\Contracts\Client::class, $yourFakeClient);
```

🌐 Contributing
--------------

[](#globe_with_meridians-contributing)

If you want to extend functionality or correct a bug, feel free to create a new pull request at Github's repository.

⚖️ License
----------

[](#balance_scale-license)

[MIT](https://choosealicense.com/licenses/mit/)

💻 Support
---------

[](#computer-support)

For support, email .

[MonoVM.com](https://monovm.com)

[![Logo](https://camo.githubusercontent.com/bfd331c07fa9714b4812f9b4b687c63dce6f8fb0f4d5a63cac9de7eb91c9207f/68747470733a2f2f6d6f6e6f766d2e636f6d2f736974652d6173736574732f696d616765732f6c6f676f2d6d6f6e6f766d2e737667)](https://camo.githubusercontent.com/bfd331c07fa9714b4812f9b4b687c63dce6f8fb0f4d5a63cac9de7eb91c9207f/68747470733a2f2f6d6f6e6f766d2e636f6d2f736974652d6173736574732f696d616765732f6c6f676f2d6d6f6e6f766d2e737667)

###  Health Score

20

↑

LowBetter than 12% of packages

Maintenance65

Regular maintenance activity

Popularity0

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity11

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/f5c284a2bc7a21425bf7fa4a51d46e05d2244a1f3afcab40e9e9d31d8481aae5?d=identicon)[monovm](/maintainers/monovm)

---

Top Contributors

[![imhaji](https://avatars.githubusercontent.com/u/68780723?v=4)](https://github.com/imhaji "imhaji (2 commits)")

---

Tags

domaindomain-availabilitydomain-checkerlaravellaravel-packagephpwhoiswhois-lookup

### Embed Badge

![Health badge](/badges/monovm-whois-laravel/health.svg)

```
[![Health](https://phpackages.com/badges/monovm-whois-laravel/health.svg)](https://phpackages.com/packages/monovm-whois-laravel)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
