PHPackages                             licensetorun/laravel-license-client - 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. [Authentication &amp; Authorization](/categories/authentication)
4. /
5. licensetorun/laravel-license-client

ActiveLibrary[Authentication &amp; Authorization](/categories/authentication)

licensetorun/laravel-license-client
===================================

Drop-in Laravel client for Licensetorun.com — activate, validate and auto-update your product against the licensing API.

v1.0.0(yesterday)01↑2900%MITPHPPHP ^8.1CI failing

Since Jun 18Pushed yesterdayCompare

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

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

Laravel License Client
======================

[](#laravel-license-client)

A drop-in Laravel client for [Licensetorun.com](https://licensetorun.com). Add your product id and license key, and the package handles activation, cached validation, seat swapping, and update checks against the licensing API.

Install
-------

[](#install)

```
composer require licensetorun/laravel-license-client
php artisan vendor:publish --tag=licensing-config
```

Set your credentials in `.env`:

```
LICENSING_API_BASE=https://licensetorun.com
LICENSING_PRODUCT_ID=your-product-public-uuid   # from the product page in the dashboard
LICENSING_KEY=CUSTOMER-LICENSE-KEY
```

> `LICENSING_KEY` is the customer's key. In a multi-tenant app you'll usually store each tenant's key in your DB and pass it per-call instead of via `.env` (see below).

Usage
-----

[](#usage)

```
use Licensetorun\LicenseClient\Facades\License;

// One-time, when the customer enters their key:
$result = License::activate();
if ($result->failed()) {
    return back()->withErrors($result->message());
}

// Anywhere you need to gate a feature (cached — cheap to call often):
if (License::isValid()) {
    // ...licensed feature...
}

// Full result inspection:
$result = License::validate();
$result->ok();                 // bool
$result->error();              // e.g. "license_expired", "ip_not_allowed"
$result->license();            // ['status' => 'active', 'expires_at' => ..., 'activations_used' => 1, ...]
```

### Gate routes with middleware

[](#gate-routes-with-middleware)

```
Route::middleware('licensed')->group(function () {
    Route::get('/premium', PremiumController::class);
});
```

Configure what happens when unlicensed in `config/licensing.php` (`gate.abort_status`or `gate.redirect_route`).

### Move a license to a new server

[](#move-a-license-to-a-new-server)

```
License::swap('old-server.com', 'new-server.com');
```

### Auto-updates / "is there a newer version?"

[](#auto-updates--is-there-a-newer-version)

```
$update = License::checkForUpdate(currentVersion: '1.2.0');

if ($update->get('update_available')) {
    $version     = $update->get('version');
    $downloadUrl = $update->get('download_url'); // short-lived signed URL
}
```

### Artisan

[](#artisan)

```
php artisan license:activate CUSTOMER-KEY
php artisan license:status --fresh
```

Multi-tenant apps
-----------------

[](#multi-tenant-apps)

Build a client per tenant instead of using the global facade:

```
use Licensetorun\LicenseClient\LicenseClient;

$client = new LicenseClient(array_merge(config('licensing'), [
    'license_key' => $tenant->license_key,
    'instance'    => $tenant->domain,   // one seat per tenant domain
]));

$client->validate();
```

How it works
------------

[](#how-it-works)

- Identity: each install is an **instance** (defaults to your `APP_URL` host; override per-tenant). Seats are counted per instance.
- `validate()` / `isValid()` cache the result for `config('licensing.cache.ttl')`(12h by default) so they don't hit the API on every request.
- Every method returns a `LicenseResult` and never throws — network errors surface as `->error() === 'network_error'`.

MIT licensed.

###  Health Score

39

—

LowBetter than 85% of packages

Maintenance100

Actively maintained with recent releases

Popularity2

Limited adoption so far

Community2

Small or concentrated contributor base

Maturity42

Maturing project, gaining track record

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

Unknown

Total

1

Last Release

1d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/130300974?v=4)[Bweb Solutions LLC](/maintainers/bwebsolutionsllc)[@bwebsolutionsllc](https://github.com/bwebsolutionsllc)

---

Tags

laravellicensesaaslicensinglicensetorun

### Embed Badge

![Health badge](/badges/licensetorun-laravel-license-client/health.svg)

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

###  Alternatives

[psalm/plugin-laravel

Psalm plugin for Laravel

3325.1M337](/packages/psalm-plugin-laravel)[hasinhayder/tyro

Tyro - The ultimate Authentication, Authorization, and Role &amp; Privilege Management solution for Laravel 12 &amp; 13

6753.6k5](/packages/hasinhayder-tyro)[jurager/teams

Laravel package to manage team functionality and operate with user permissions.

23720.8k](/packages/jurager-teams)[rahul900day/laravel-captcha

Different types of Captcha implementation for Laravel Application.

10920.2k](/packages/rahul900day-laravel-captcha)[kovah/laravel-socialite-oidc

OpenID Connect OAuth2 Provider for Laravel Socialite

24110.5k](/packages/kovah-laravel-socialite-oidc)[masterix21/laravel-licensing

Laravel licensing package with polymorphic assignment to any model, activation keys, expirations/renewals, and seat control via LicenseUsage. Supports offline verification with public-key–signed tokens, a CLI to generate/rotate/revoke keys, and an extensible architecture via config and contracts.

1432.1k4](/packages/masterix21-laravel-licensing)

PHPackages © 2026

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