microweber-packages / microweber-system-licenses
Standalone license management package for Laravel. Manages system_licenses table, license validation, consumption and caching.
Package info
github.com/microweber-packages/microweber-system-licenses
pkg:composer/microweber-packages/microweber-system-licenses
Requires
- php: ^8.2
- illuminate/cache: ^10.0|^11.0|^12.0|^13.0
- illuminate/database: ^10.0|^11.0|^12.0|^13.0
- illuminate/support: ^10.0|^11.0|^12.0|^13.0
- microweber-packages/microweber-database: *
- microweber-packages/microweber-package: *
- spatie/laravel-package-tools: ^1.16
Requires (Dev)
- orchestra/testbench: ^8.0|^9.0|^10.0
- phpunit/phpunit: ^10.0|^11.0
Suggests
None
Provides
None
Conflicts
None
Replaces
- microweber-packages/system-licenses: *
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