Download the PHP package masterix21/laravel-licensing without Composer
On this page you can find all versions of the php package masterix21/laravel-licensing. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download masterix21/laravel-licensing
More information about masterix21/laravel-licensing
Files in masterix21/laravel-licensing
Package laravel-licensing
Short Description 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.
License MIT
Homepage https://github.com/masterix21/laravel-licensing
Informations about the package laravel-licensing
Laravel Licensing
A licensing package for Laravel with offline verification, seat management, cryptographic key rotation, and multi-product support.
Features
- Offline verification — PASETO v4 tokens signed with Ed25519, verifiable without a server connection
- Seat-based licensing — control how many devices, users, or instances can use a license
- Full lifecycle management — activation, renewal, grace periods, expiration, suspension
- Multi-product scopes — isolate signing keys per product so a compromise doesn't spread
- Two-level key hierarchy — root CA signs short-lived signing keys; rotate without breaking clients
- Audit trail — append-only log of every license, usage, and key event
- Polymorphic assignment — attach a license to any Eloquent model
- Flexible key management — auto-generation, custom keys, encrypted storage with optional retrieval
Requirements
- PHP 8.3+
- Laravel 12 or 13
ext-opensslandext-sodium
Installation
Publish config and migrations, then migrate:
Generate your root key and first signing key:
The root key is encrypted with the passphrase from the
LICENSING_KEY_PASSPHRASEenv variable. If missing, the command will prompt you to set one (unless running with--no-interaction).
MySQL / MariaDB notes
Migrations are tested against MySQL 8 and MariaDB 11 in CI. Two points worth knowing if you run into errors on older setups:
- Identifier 1059 errors (
Identifier name '…' is too long): the package already ships explicit short names for the only composite indexes that would exceed MySQL's 64-char limit. If you add custom migrations on top, remember to pass a short alias tomorphs()/index()when the auto-generated name would overflow. - Key length 1071 errors (
Specified key was too long): only relevant on MySQL < 5.7 or MariaDB < 10.2 with InnoDB's old row format. AddSchema::defaultStringLength(191);in yourAppServiceProvider::boot()as per the Laravel docs. This is unrelated to identifier length — it caps the indexed VARCHAR prefix, not the index name.
Quick Start
Create and activate a license
You can also pass your own key as second argument to createWithKey(), or use the lower-level License::create() with a pre-hashed key via License::hashKey().
Register a device (seat)
Issue an offline token
Check license status
Key retrieval and regeneration
Multi-Product Scopes
Scopes let you manage multiple products with independent signing keys and rotation schedules.
Issue a signing key for this scope:
When you create a license with a license_scope_id, tokens are automatically signed with the scope's key. A compromised key in one scope doesn't affect the others.
Key Management
Key generation, retrieval, and regeneration are handled by pluggable services:
Implement LicenseKeyGeneratorContract (or the retriever/regenerator contracts) to plug in your own logic.
Related Packages
| Package | Description |
|---|---|
| laravel-licensing-client | Client package for validating licenses against a server — offline verification, usage registration, route middleware |
| laravel-licensing-filament-manager | Filament admin panel for license management, usage monitoring, key rotation, and audit trail |
Testing
Laravel Boost integration
This package ships AI guidelines under resources/boost/guidelines/laravel-licensing/core.blade.php. Apps using Laravel Boost auto-discover them:
The guidelines cover: core concepts, licenses, usages/seats, scopes & templates, trials, offline tokens, CLI, and API/security. AI assistants (Claude Code, Copilot, Cursor, …) will follow them when generating code against laravel-licensing.
Heads up:
boost:update --discoveruses an interactive multi-select. On a TTY, selectmasterix21/laravel-licensingwhen prompted. In non-interactive environments (CI, automation), the prompt is silently skipped and the package is not added — append it manually toboost.json:then re-run
php artisan boost:update --no-interaction.
To verify the integration end-to-end against a throwaway Laravel app, run scripts/test-boost-e2e.sh from the package root.
Documentation
Full documentation is available in the docs folder.
Sponsor
If this package is useful to you, consider sponsoring its development.
Contributing
Contributions are welcome. See CONTRIBUTING.md for details.
Security
If you discover a security vulnerability, please email [email protected] instead of using the issue tracker.
License
MIT. See LICENSE.md.
Credits
- Luca Longo
- All Contributors
All versions of laravel-licensing with dependencies
ext-openssl Version *
ext-sodium Version *
illuminate/console Version ^12.0 || ^13.0
illuminate/contracts Version ^12.0 || ^13.0
illuminate/database Version ^12.0 || ^13.0
illuminate/http Version ^12.0 || ^13.0
illuminate/support Version ^12.0 || ^13.0
paragonie/paseto Version ^3.5
spatie/crypto Version ^2.0
spatie/laravel-package-tools Version ^1.16
spatie/laravel-sluggable Version ^4.0.0
symfony/uid Version ^7.0 || ^8.0