PHPackages                             subdomainto/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. subdomainto/laravel

ActiveLibrary

subdomainto/laravel
===================

Laravel package for the subdomain.to custom domains API with an injectable client, facade, configuration, and signed webhook middleware.

v1.0.1(1mo ago)00MITPHPPHP ^8.2

Since Jul 15Pushed 1mo agoCompare

[ Source](https://github.com/subdomain-to/laravel)[ Packagist](https://packagist.org/packages/subdomainto/laravel)[ Docs](https://docs.subdomain.to/sdks/laravel)[ RSS](/packages/subdomainto-laravel/feed)WikiDiscussions main Synced 1w ago

READMEChangelogDependencies (16)Versions (3)Used By (0)

subdomain.to for Laravel
========================

[](#subdomainto-for-laravel)

`subdomainto/laravel` adds the subdomain.to custom domains API to Laravel applications. It registers the typed PHP client in the service container, provides an optional facade, publishes configuration, and includes middleware for signed webhook verification.

The package supports Laravel 12 and 13 on PHP 8.2 or later.

Installation
------------

[](#installation)

```
composer require subdomainto/laravel
php artisan vendor:publish --tag=subdomainto-config
```

Configure server-side credentials:

```
SUBDOMAINTO_API_KEY=sdt_live_xxxxxxxxxxxxxxxxxxxxxxxx
SUBDOMAINTO_WEBHOOK_SECRET=whsec_xxxxxxxxxxxxxxxx
SUBDOMAINTO_WEBHOOK_TOLERANCE=300
```

Inject the custom domains client
--------------------------------

[](#inject-the-custom-domains-client)

```
use SubdomainTo\Client;
use SubdomainTo\Model\Domain;

final class ConnectCustomerDomain
{
    public function __construct(private Client $subdomainTo) {}

    public function handle(string $customerId, string $hostname): Domain
    {
        return $this->subdomainTo->domains()->create(
            $hostname,
            $customerId.'-domain',
        );
    }
}
```

The client exposes typed resources for destinations, domains, DNS and TLS lifecycle status, webhooks, widget sessions, usage, and billing. You can also use the `SubdomainTo` facade in commands, jobs, and prototypes.

Protect a webhook route
-----------------------

[](#protect-a-webhook-route)

```
use Illuminate\Support\Facades\Route;

Route::post('/webhooks/subdomainto', SubdomainToWebhookController::class)
    ->middleware('subdomainto.webhook');
```

The middleware verifies the untouched request body, `SubdomainTo-Signature`, HMAC signature, and timestamp before placing the verified event on the `subdomainto_event` request attribute.

Documentation
-------------

[](#documentation)

Read the [Laravel SDK guide](https://docs.subdomain.to/sdks/laravel), browse the [custom domains API documentation](https://docs.subdomain.to), or report an issue in the [GitHub repository](https://github.com/subdomain-to/laravel/issues).

License
-------

[](#license)

MIT

###  Health Score

39

—

LowBetter than 84% of packages

Maintenance94

Actively maintained with recent releases

Popularity0

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity47

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 75% 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.

###  Release Activity

Cadence

Every ~13 days

Total

2

Last Release

32d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/9df02645cfbf7549cd8fd20348744cefcfad5b7f15edfc1b3212839b0db5e066?d=identicon)[subdomainto](/maintainers/subdomainto)

---

Top Contributors

[![subdomainto](https://avatars.githubusercontent.com/u/263146959?v=4)](https://github.com/subdomainto "subdomainto (3 commits)")[![laurentdav](https://avatars.githubusercontent.com/u/45101601?v=4)](https://github.com/laurentdav "laurentdav (1 commits)")

---

Tags

custom-domainsdnslaravelmiddlewarephpsaassdktlswebhooksmiddlewarelaraveldnstlssslwebhookssaascustom-domainsdomain-management

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[laravel/socialite

Laravel wrapper around OAuth 1 &amp; OAuth 2 libraries.

5.7k118.2M1.0k](/packages/laravel-socialite)[psalm/plugin-laravel

Psalm plugin for Laravel

3365.5M359](/packages/psalm-plugin-laravel)[laravel/mcp

Rapidly build MCP servers for your Laravel applications.

80732.6M270](/packages/laravel-mcp)[laravel/reverb

Laravel Reverb provides a real-time WebSocket communication backend for Laravel applications.

1.6k20.8M124](/packages/laravel-reverb)[fleetbase/core-api

Core Framework and Resources for Fleetbase API

1346.4k29](/packages/fleetbase-core-api)[eslazarev/wildberries-sdk

Wildberries OpenAPI clients (generated).

353.6k](/packages/eslazarev-wildberries-sdk)

PHPackages © 2026

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