Download the PHP package getkeymanager/laravel-sdk without Composer
On this page you can find all versions of the php package getkeymanager/laravel-sdk. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download getkeymanager/laravel-sdk
More information about getkeymanager/laravel-sdk
Files in getkeymanager/laravel-sdk
Package laravel-sdk
Short Description Official Laravel SDK for License Management Platform - Elegant license validation, activation, and management for Laravel applications
License MIT
Homepage https://getkeymanager.com
Informations about the package laravel-sdk
KeyManager - License Manager Laravel SDK
For KeyManager (https://getkeymanager.com).
Version: 3.0.0 - Identifier-first with configuration inheritance and offline-first validation!
Official Laravel SDK for License Management Platform. Elegant license validation, activation, and management for Laravel applications with built-in middleware, Artisan commands, and facade support.
Features
- 🚀 Easy Integration - Service provider auto-discovery, zero configuration
- 🧐 Laravel-Native - Facades, middleware, Artisan commands
- 🔐 Route Protection - Protect routes with license validation middleware
- 🎯 Feature Flags - Feature-gate middleware for license-based features
- 🔨 CLI Commands - Artisan commands for license operations
- 📏 Full Logging - Optional Laravel logging integration
- ⚡ Session Caching - Automatic session-based caching
- 🔄 Laravel 10, 11, 12 - Multi-version compatibility
- NEW v3.0.0: Configuration inheritance, offline-first validation, identifier parameters, type-safe DTOs
New in v3.0.0 - BREAKING CHANGES
- ✅ Mandatory Identifier Parameter - Use
default_identifierin config or pass explicitly - ✅ Configuration Inheritance - Set
license_file_path,default_identifier, enhancedpublic_key_filein config - ✅ Offline-First Validation - Automatically validates against cached .lic file before API
- ✅ Type-Safe Methods - Import and use Constants:
ValidationType,IdentifierType - ✅ Enhanced Error Messages - Actionable errors with documentation links
- ⚠️ MIGRATION REQUIRED: See migration guide in config file
Requirements
- PHP 8.1 or higher
- Laravel 10.x, 11.x, or 12.x
- ext-json, ext-openssl, ext-curl
Installation
Install via Composer:
Publish Configuration (Optional)
This creates config/getkeymanager.php.
Environment Configuration
Add to your .env file:
Quick Start
Configuration Setup
Publish and configure in config/getkeymanager.php:
Using the Facade
Using Dependency Injection
Middleware Protection
Protect Routes with License Validation
Feature-Gated Routes
Accessing License Data in Controllers
The middleware attaches license data to the request:
Custom Redirect on Validation Failure
Configure in config/getkeymanager.php:
Providing License Key
The middleware accepts license keys from:
- Header:
X-License-Key - Query parameter:
?license_key=XXXXX - Request body:
license_keyfield - Session (cached from previous validation)
Artisan Commands
Validate a License
Activate a License
Deactivate a License
Advanced Usage
Creating Licenses
Offline Validation
Getting License Details
License Lifecycle Management
Working with Metadata
Telemetry
Downloadables
Configuration Reference
Full configuration in config/getkeymanager.php:
Error Handling
Testing
Mocking in Tests
API Reference
The Laravel SDK proxies all methods from the base PHP SDK. See the full API reference.
Core Methods
validateLicense(string $licenseKey, array $options = []): arrayactivateLicense(string $licenseKey, array $options = []): arraydeactivateLicense(string $licenseKey, array $options = []): arraycheckFeature(string $licenseKey, string $featureName): arrayvalidateOfflineLicense($offlineLicenseData, array $options = []): array
License Management
createLicenseKeys(string $productUuid, string $generatorUuid, array $licenses, ?string $customerEmail, array $options = []): arrayupdateLicenseKey(string $licenseKey, array $options = []): arraygetLicenseDetails(string $licenseKey): arraygetLicenseActivations(string $licenseKey): arraysuspendLicense(string $licenseKey): arrayresumeLicense(string $licenseKey): arrayrevokeLicense(string $licenseKey): array
Utilities
generateHardwareId(): stringgenerateUuid(): string
Examples
See the examples directory for complete working examples.
Support
- Website: https://getkeymanager.com
- Documentation: https://docs.getkeymanager.com
- API Reference: https://dev.getkeymanager.com/api
- Issues: https://github.com/getkeymanager/laravel-sdk/issues
- Email: [email protected]
License
This SDK is open-sourced software licensed under the MIT license.
Related
All versions of laravel-sdk with dependencies
illuminate/support Version ^10.0 || ^11.0 || ^12.0
illuminate/console Version ^10.0 || ^11.0 || ^12.0
illuminate/http Version ^10.0 || ^11.0 || ^12.0
getkeymanager/php-sdk Version ^3.0