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

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

groupesti/laravel-license
=========================

Software licensing for Laravel: signed license tokens (JWT EdDSA/RS256), products/editions/features, device activations and validation logging.

1.1.0(1w ago)00MITPHPPHP ^8.3CI failing

Since Jul 26Pushed 1w agoCompare

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

READMEChangelog (3)Dependencies (9)Versions (4)Used By (0)

Laravel License
===============

[](#laravel-license)

 [![Build Status](https://github.com/groupesti/laravel-license/actions/workflows/tests.yml/badge.svg)](https://github.com/groupesti/laravel-license/actions/workflows/tests.yml) [![Total Downloads](https://camo.githubusercontent.com/f8091b0dea9689130faaa2c03bd837636005af09a37e919f0f89a78697eb0c61/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f67726f7570657374692f6c61726176656c2d6c6963656e7365)](https://packagist.org/packages/groupesti/laravel-license) [![Latest Stable Version](https://camo.githubusercontent.com/25728502adc6573954dbce9c582957673d98ad3b24d0a0e98932300c120bb4b0/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f67726f7570657374692f6c61726176656c2d6c6963656e7365)](https://packagist.org/packages/groupesti/laravel-license) [![License](https://camo.githubusercontent.com/29724e0d9383b65ccc3d323ff28da7aeef84a3f4b8866fd5ef31fb1542ccbded/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f67726f7570657374692f6c61726176656c2d6c6963656e7365)](https://packagist.org/packages/groupesti/laravel-license)

Software licensing for Laravel: issue **signed license tokens** (JWT, EdDSA or RS256), validate them, manage products / editions / features, track per-device activations and log every validation — fully configurable and self-contained.

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

[](#installation)

```
composer require groupesti/laravel-license
php artisan vendor:publish --tag=license-config
php artisan migrate
```

Signing keys are read from configuration (never the database). Generate an Ed25519 key pair and set:

```
LICENSE_ACTIVE_KID=default
LICENSE_ALGORITHM=EdDSA
LICENSE_PRIVATE_KEY="base64-or-PEM-private-key"
LICENSE_PUBLIC_KEY="base64-or-PEM-public-key"
LICENSE_ISSUER="https://your-app.example"
```

Concepts
--------

[](#concepts)

- **Product / Edition / Feature** — your catalogue. An edition bundles features (with optional per-feature limits).
- **License** — issued to a licensee (any model, via the `HasLicenses` trait), carries a `type` and `status`, validity window and device cap.
- **Activation** — one row per device that has activated a license.
- **ValidationLog** — an audit trail of every validation attempt.

`LicenseStatus`, `LicenseType`, `ActivationStatus` and `ValidationResult` are **Eloquent models** (reference tables) — you can add your own rows. The package seeds the default values and exposes slug constants (e.g. `LicenseStatus::ACTIVE`).

Issuing a license
-----------------

[](#issuing-a-license)

```
use License\Actions\IssueLicense;
use License\Models\LicenseStatus;
use License\Models\LicenseType;

$license = app(IssueLicense::class)->execute([
    'product_id'        => $product->id,
    'edition_id'        => $edition->id,
    'license_type_id'   => LicenseType::idFor(LicenseType::SUBSCRIPTION),
    'license_status_id' => LicenseStatus::idFor(LicenseStatus::ACTIVE),
    'name'              => 'Acme Corp',
    'max_devices'       => 5,
    'valid_from'        => now(),
    'valid_until'       => now()->addYear(),
]);

$token = $license->plain_token; // signed JWT, returned once on creation
```

Or from the CLI:

```
php artisan license:create --product=my-app --edition=pro --type=subscription --email=customer@example.com
```

Validating a license
--------------------

[](#validating-a-license)

```
use License\Actions\ValidateLicense;

$result = app(ValidateLicense::class)->execute($token, $deviceId, [
    'ip_address' => request()->ip(),
]);
// ['valid' => true, 'result' => 'valid', 'license' => [...], 'claims' => [...], 'expires_at' => '...']
```

Public HTTP endpoint (rate limited): `POST /api/v1/license/validate`.

### Online (real-time) verification

[](#online-real-time-verification)

Set `online_verification` on a license to require **real-time** validation. The token then carries the flag and a `heartbeat` schedule (`interval` / `grace`, from `config('license.online_verification')`), and the client must call the validation endpoint at least once per interval.

- Licenses **with** `online_verification` are validated by the endpoint (live status, revocation and device checks); the response includes a `heartbeat`with the next check-in time.
- Licenses **without** it are meant to be validated offline — the endpoint **refuses** them with `result: online_not_required` (HTTP 409).

```
php artisan license:create --product=my-app --type=subscription --online
```

Attaching licenses to a model
-----------------------------

[](#attaching-licenses-to-a-model)

```
use License\Traits\HasLicenses;

class Team extends Model
{
    use HasLicenses; // $team->licenses()
}
```

Commands
--------

[](#commands)

```
php artisan license:create      # create and sign a license
php artisan license:validate    # validate a token
php artisan license:revoke      # revoke by id or jti
```

HTTP API
--------

[](#http-api)

- `POST /api/v1/license/validate` — public validation.
- `/api/v1/admin/licenses/*` — admin CRUD + catalogue (guarded by `admin_api_middleware`).

Translations
------------

[](#translations)

Provided for `en`, `fr`, `es`.

```
php artisan vendor:publish --tag=license-lang
```

License
-------

[](#license)

MIT. See [license.md](license.md).

###  Health Score

40

—

FairBetter than 86% of packages

Maintenance98

Actively maintained with recent releases

Popularity0

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity50

Maturing project, gaining track record

 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.

###  Release Activity

Cadence

Every ~0 days

Total

3

Last Release

7d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/5d5d8cda447c6966d4dbce644bd1d2684a190f818b7a35f1361e0990c791aa6e?d=identicon)[groupesti](/maintainers/groupesti)

---

Top Contributors

[![SimardRichard](https://avatars.githubusercontent.com/u/54546844?v=4)](https://github.com/SimardRichard "SimardRichard (3 commits)")

---

Tags

jwtlaravellicenseactivationlicensing

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[psalm/plugin-laravel

Psalm plugin for Laravel

3355.4M352](/packages/psalm-plugin-laravel)[laravel/mcp

Rapidly build MCP servers for your Laravel applications.

78727.1M205](/packages/laravel-mcp)[roots/acorn

Framework for Roots WordPress projects built with Laravel components.

9872.4M142](/packages/roots-acorn)[forjedio/inertia-table

Backend-driven dynamic tables for Laravel + Inertia.js

272.0k](/packages/forjedio-inertia-table)[api-platform/laravel

API Platform support for Laravel

58174.6k18](/packages/api-platform-laravel)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

255.2k](/packages/aedart-athenaeum)

PHPackages © 2026

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