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. [Database &amp; ORM](/categories/database)
4. /
5. nanorocks/laravel-license-manager

ActiveLibrary[Database &amp; ORM](/categories/database)

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.1.0(1mo ago)12532MITPHPPHP ^8.3CI passing

Since Sep 1Pushed 1mo agoCompare

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

READMEChangelog (1)Dependencies (14)Versions (3)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

44

—

FairBetter than 90% of packages

Maintenance90

Actively maintained with recent releases

Popularity17

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity52

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 ~256 days

Total

2

Last Release

50d 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 (18 commits)")

---

Tags

laravellicensemanagementpackagelaraveldatabasenewsletternanorocks

###  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

[illuminate/database

The Illuminate Database package.

2.8k54.9M11.7k](/packages/illuminate-database)[defstudio/telegraph

A laravel facade to interact with Telegram Bots

816333.9k3](/packages/defstudio-telegraph)[psalm/plugin-laravel

Psalm plugin for Laravel

3355.3M346](/packages/psalm-plugin-laravel)[spatie/laravel-health

Monitor the health of a Laravel application

87512.0M167](/packages/spatie-laravel-health)[harris21/laravel-fuse

Circuit breaker for Laravel queue jobs. Protect your workers from cascading failures.

44855.7k](/packages/harris21-laravel-fuse)[clickbar/laravel-magellan

This package provides functionality for working with the postgis extension in Laravel.

440902.9k1](/packages/clickbar-laravel-magellan)

PHPackages © 2026

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