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

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

nanorocks/laravel-license-manager
=================================

A Laravel package for flexible license key management. Ideal for SaaS platforms, plugins, and systems that require license validation, assignment, and lifecycle management.

v1.0.0(8mo ago)11452MITPHPPHP ^8.3CI passing

Since Sep 1Pushed 6mo agoCompare

[ Source](https://github.com/nanorocks/laravel-license-manager)[ Packagist](https://packagist.org/packages/nanorocks/laravel-license-manager)[ Docs](https://github.com/nanorocks/laravel-license-manager)[ GitHub Sponsors](https://github.com/Nanorocks)[ RSS](/packages/nanorocks-laravel-license-manager/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)Dependencies (12)Versions (2)Used By (0)

Laravel License Manager
=======================

[](#laravel-license-manager)

[![Laravel License Manager](images/laravel-license-manager-banner.png)](images/laravel-license-manager-banner.png)

[![Laravel](https://camo.githubusercontent.com/39664b735525df36d17500555c2f29b6f28c0b2850d0a8d0c1582f1b241ea636/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c61726176656c2d25354531302e782532302d7265643f7374796c653d666c61742d737175617265)](https://camo.githubusercontent.com/39664b735525df36d17500555c2f29b6f28c0b2850d0a8d0c1582f1b241ea636/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c61726176656c2d25354531302e782532302d7265643f7374796c653d666c61742d737175617265)[![PHP](https://camo.githubusercontent.com/e65c57e865a0b07a30856ddb566cc8cff2fed0e6d63c3f44075fc102a53d41fe/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d253545382e332d626c75653f7374796c653d666c61742d737175617265)](https://camo.githubusercontent.com/e65c57e865a0b07a30856ddb566cc8cff2fed0e6d63c3f44075fc102a53d41fe/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d253545382e332d626c75653f7374796c653d666c61742d737175617265)[![License](https://camo.githubusercontent.com/422db9fd40f5831c765cf6530b6750c081b696bd18d904cf89554df98c676277/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d677265656e3f7374796c653d666c61742d737175617265)](https://camo.githubusercontent.com/422db9fd40f5831c765cf6530b6750c081b696bd18d904cf89554df98c676277/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d677265656e3f7374796c653d666c61742d737175617265)[![Latest Stable Version](https://camo.githubusercontent.com/eaf32e7609c1d6cf2727a0e2669131a3f5e89ac9cd75531f9dd97836a02cc314/68747470733a2f2f706f7365722e707567782e6f72672f6e616e6f726f636b732f6c61726176656c2d64617461626173652d6e6577736c65747465722f762f737461626c65)](https://packagist.org/packages/nanorocks/laravel-database-newsletter)

A Laravel package for flexible license key management. Ideal for SaaS platforms, plugins, and systems that require license validation, assignment, and lifecycle management. This package allows you to generate, assign, validate, and manage license keys stored in your database. Includes Facade support for easy integration anywhere in your application.

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

[](#installation)

Install the package via Composer:

```
composer require nanorocks/laravel-license-manager
```

Publish and run the migrations:

```
php artisan vendor:publish --tag="license-manager-migrations"
php artisan migrate
```

Publish the configuration:

```
php artisan vendor:publish --tag="license-manager-config"
```

**Example config file (**``**):**

```
return [
    'key_length' => 16,
    'default_expiration_days' => 30,
    'table_name' => 'plugin_database_newsletter_licenses',
];
```

Usage
-----

[](#usage)

### Using the Service Class

[](#using-the-service-class)

```
use Nanorocks\LicenseManager\Services\LicenseService;

$service = app(LicenseService::class);

// Generate a license
$license = $service->createLicense([
    'license_key' => 'TEST-1234',
    'assigned_to' => 'user@example.com',
    'expires_at' => now()->addDays(30),
]);

// Validate a license
$isValid = $service->validateLicense('TEST-1234');

// Assign a license to a user
$service->assignLicense('TEST-1234', 'anotheruser@example.com');

// Deactivate a license
$service->deactivateLicense('TEST-1234');
```

### Using the Facade

[](#using-the-facade)

```
use Nanorocks\LicenseManager\Facades\LicenseManager;

$isValid = LicenseManager::validateLicense('TEST-1234');
LicenseManager::assignLicense('TEST-1234', 'user@example.com');
```

### Artisan Command

[](#artisan-command)

Generate a license via Artisan:

```
php artisan license:generate --assigned-to="user@example.com" --expires-in=30 --key-length=16
```

Testing
-------

[](#testing)

Run the package tests:

```
composer test
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for detailed information on changes and updates.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for contribution guidelines.

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Report any security issues via [our security policy](../../security/policy).

Credits
-------

[](#credits)

- [Nanorocks](https://github.com/nanorocks)
- All Contributors ([GitHub](../../contributors))

License
-------

[](#license)

This package is open-source under the MIT License. See [LICENSE](LICENSE.md) for details.

###  Health Score

37

—

LowBetter than 83% of packages

Maintenance63

Regular maintenance activity

Popularity17

Limited adoption so far

Community7

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

Unknown

Total

1

Last Release

253d ago

### Community

Maintainers

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

---

Top Contributors

[![nanorocks](https://avatars.githubusercontent.com/u/18250654?v=4)](https://github.com/nanorocks "nanorocks (17 commits)")

---

Tags

laravellicensemanagementpackagelaravelnanorockslaravel-license-manager

###  Code Quality

TestsPest

Static AnalysisPHPStan

Code StyleLaravel Pint

### Embed Badge

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

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

###  Alternatives

[spatie/laravel-permission

Permission handling for Laravel 12 and up

12.9k89.8M1.0k](/packages/spatie-laravel-permission)[bezhansalleh/filament-shield

Filament support for `spatie/laravel-permission`.

2.8k2.9M88](/packages/bezhansalleh-filament-shield)[jeffgreco13/filament-breezy

A custom package for Filament with login flow, profile and teams support.

1.0k1.7M41](/packages/jeffgreco13-filament-breezy)[spatie/laravel-login-link

Quickly login to your local environment

4381.2M1](/packages/spatie-laravel-login-link)[ryangjchandler/laravel-cloudflare-turnstile

A simple package to help integrate Cloudflare Turnstile.

438896.6k2](/packages/ryangjchandler-laravel-cloudflare-turnstile)[spatie/laravel-passkeys

Use passkeys in your Laravel app

444494.4k16](/packages/spatie-laravel-passkeys)

PHPackages © 2026

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