Download the PHP package westel/laravel-license without Composer
On this page you can find all versions of the php package westel/laravel-license. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download westel/laravel-license
More information about westel/laravel-license
Files in westel/laravel-license
Package laravel-license
Short Description A comprehensive Laravel package for license management and feature gating with server-client architecture
License MIT
Informations about the package laravel-license
Westel Laravel License
A comprehensive Laravel package for license management and feature gating with server-client architecture, hardware fingerprinting, and offline validation.
Features
- Dual Mode: Works as both license server and client
- Hardware Fingerprinting: Secure device binding
- Offline Validation: JWT-based validation for up to 30 days offline
- Feature Gating: Control feature access per license
- Grace Periods: Configurable grace periods for expired licenses
- Multi-Product Support: Manage licenses for multiple SaaS products
- RESTful API: Complete API for external integrations
- Middleware: Easy route and feature protection
- Comprehensive Logging: Track all validation attempts
- ๐จ UI Components (Optional): Pre-built React/Inertia.js interface for license management
- ๐ Encrypted Storage: Database-backed license configuration with encryption
Installation
Install the package via composer:
Publish the configuration file:
Publish and run migrations (Server Mode only):
Optional: UI-Based License Management
NEW! The package now includes optional UI components for managing license settings through a web interface instead of .env files.
See UI-INSTALLATION.md for detailed setup instructions.
Quick setup:
Features:
- ๐ Encrypted license key storage
- ๐งช Connection testing
- ๐จ Beautiful React/Inertia UI
- ๐ Live configuration updates
- โ Admin-only access
Configuration
Configure the package in config/license.php:
Server Mode
Client Mode
Usage
Server Mode
1. Create Products and Licenses
2. API Endpoints
The package automatically registers these API endpoints:
Client Mode
1. Initialize License Client
2. Check Features
3. Middleware Protection
Protect routes:
4. Blade Directives
5. Hardware Fingerprinting
6. Offline Mode
The package automatically handles offline validation:
Advanced Usage
Custom Feature Validation
License Events
Listen for license events:
Grace Period Handling
API Reference
Client SDK Methods
Server API Endpoints
POST /api/license/validate
Request:
Response:
Testing
Run the package tests:
Security
- Hardware fingerprints are hashed using SHA-256
- JWT tokens are signed with HS256 (or RS256 for production)
- All API requests support CORS configuration
- Validation attempts are logged for audit trails
Migration from Existing System
If you have an existing license system:
- Backup your database
- Install the package
- Run migrations
- Map your existing data to package models
- Update API endpoints to use package routes
- Test thoroughly before deploying
Troubleshooting
License validation fails in offline mode
Check that:
- JWT secret is correctly configured
- Offline token was generated during last online validation
- Token has not expired (check
offline_validation_days)
Hardware fingerprint mismatch
- Ensure consistent fingerprint generation
- Check tolerance settings in config
- Review system info being sent
Feature gating not working
- Verify feature keys match exactly
- Check license is active and not expired
- Ensure features are assigned to product/plan
License
The MIT License (MIT). Please see License File for more information.
Support
For support, email [email protected] or open an issue on GitHub.
Credits
- Westel Team
- All Contributors
All versions of laravel-license with dependencies
illuminate/support Version ^8.0|^9.0|^10.0|^11.0|^12.0
firebase/php-jwt Version ^5.0|^6.0
guzzlehttp/guzzle Version ^7.0