Search by

microweber-packages / microweber-system-licenses

boksiora

Standalone license management package for Laravel. Manages system_licenses table, license validation, consumption and caching.

Package info

github.com/microweber-packages/microweber-system-licenses

Homepage

pkg:composer/microweber-packages/microweber-system-licenses

Statistics

Installs: 31

Dependents: 3

Suggesters: 0

Stars: 0

Open Issues: 0

v1.0.0 2026-11-03 16:18 UTC

This package is auto-updated.

Last update: 2026-11-03 17:07:38 UTC


README

Standalone Laravel package for managing software licenses. Provides a SystemLicensesManager accessible via app()->system_licenses_manager that handles license CRUD, validation, and caching.

Installation

composer require microweber-packages/microweber-system-licenses

The package auto-discovers its service provider. Run migrations:

php artisan migrate

Usage

// Check for any active license
$hasLicense = app()->system_licenses_manager->hasLicense();

// Check for a specific module license
$hasWhiteLabel = app()->system_licenses_manager->hasLicense('modules/white_label');

// Save a new license
$result = app()->system_licenses_manager->saveLicense(['local_key' => 'YOUR-KEY']);

// Validate all licenses against remote server
$result = app()->system_licenses_manager->validateLicenses();

// Delete a license
$result = app()->system_licenses_manager->deleteLicense($id);

// Helper function
if (have_license('modules/white_label')) {
    // Licensed features
}

Custom Validator

Implement LicenseValidatorInterface and bind it in your service provider:

$this->app->singleton(LicenseValidatorInterface::class, MyValidator::class);

Testing

composer test