PHPackages                             masterix21/laravel-licensing-filament-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. [Utility &amp; Helpers](/categories/utility)
4. /
5. masterix21/laravel-licensing-filament-manager

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

masterix21/laravel-licensing-filament-manager
=============================================

This is my package laravel-licensing-filament-manager

1.2.1(2mo ago)344403[1 issues](https://github.com/masterix21/laravel-licensing-filament-manager/issues)[2 PRs](https://github.com/masterix21/laravel-licensing-filament-manager/pulls)MITPHPPHP ^8.3|^8.4CI passing

Since Sep 18Pushed 1w agoCompare

[ Source](https://github.com/masterix21/laravel-licensing-filament-manager)[ Packagist](https://packagist.org/packages/masterix21/laravel-licensing-filament-manager)[ Docs](https://github.com/masterix21/laravel-licensing-filament-manager)[ GitHub Sponsors](https://github.com/masterix21)[ RSS](/packages/masterix21-laravel-licensing-filament-manager/feed)WikiDiscussions main Synced today

READMEChangelog (3)Dependencies (27)Versions (14)Used By (0)

Laravel Licensing Filament Manager
==================================

[](#laravel-licensing-filament-manager)

[![Latest Version on Packagist](https://camo.githubusercontent.com/300f6502e777b3b3c9798184382d436ffb963f933e2fbd443833b6ee4dfb9c2e/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6d6173746572697832312f6c61726176656c2d6c6963656e73696e672d66696c616d656e742d6d616e616765722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/masterix21/laravel-licensing-filament-manager)[![GitHub Tests Action Status](https://camo.githubusercontent.com/28a44a6c748679eaff38df7dcb1e6fc71da312b20506a042cad39fc961be6875/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6d6173746572697832312f6c61726176656c2d6c6963656e73696e672d66696c616d656e742d6d616e616765722f72756e2d74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/masterix21/laravel-licensing-filament-manager/actions?query=workflow%3Arun-tests+branch%3Amain)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/7c0935382e5e62111b39da959d33687977364291bcef154d6ae4f24773ef73d7/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6d6173746572697832312f6c61726176656c2d6c6963656e73696e672d66696c616d656e742d6d616e616765722f6669782d7068702d636f64652d7374796c652d6973737565732e796d6c3f6272616e63683d6d61696e266c6162656c3d636f64652532307374796c65267374796c653d666c61742d737175617265)](https://github.com/masterix21/laravel-licensing-filament-manager/actions?query=workflow%3A%22Fix+PHP+code+style+issues%22+branch%3Amain)[![Total Downloads](https://camo.githubusercontent.com/5ba34f1d75ee76cc3a7794a35e13eabfcc6e80f45547386e216bf9a95cc59a5f/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6d6173746572697832312f6c61726176656c2d6c6963656e73696e672d66696c616d656e742d6d616e616765722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/masterix21/laravel-licensing-filament-manager)

A complete Filament 4.x panel integration for the [masterix21/laravel-licensing](https://github.com/masterix21/laravel-licensing) package. This package provides a beautiful and intuitive admin interface to manage software licenses, license scopes, templates, usage tracking, and comprehensive licensing statistics directly within your Filament panel.

Related Packages
----------------

[](#related-packages)

- **Main Package**: [masterix21/laravel-licensing](https://github.com/masterix21/laravel-licensing) - The core Laravel licensing system that provides the foundation for license management
- **Client Package**: [masterix21/laravel-licensing-client](https://github.com/masterix21/laravel-licensing-client) - Client library for integrating license validation in your applications

Support This Project
--------------------

[](#support-this-project)

If you find this package useful, please consider sponsoring me to support continued development and maintenance:

[![Sponsor on GitHub](https://camo.githubusercontent.com/89082318d5d807e9915381a6c74575a80d4c1a90c5d5c3cc7c00b6af498b9654/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f53706f6e736f722d47697448756225323053706f6e736f72732d6561346161613f7374796c653d666f722d7468652d6261646765266c6f676f3d676974687562)](https://github.com/sponsors/masterix21)

Features
--------

[](#features)

- 📊 **Complete License Management**: Create, edit, and manage software licenses with full lifecycle control
- 🔐 **License Scope Management**: Define and manage different license scopes with automatic key rotation
- 📋 **Template System**: Create reusable license templates with predefined configurations
- 📱 **Usage Tracking**: Monitor and manage license usage across devices with fingerprinting
- 🔑 **Signing Key Management**: Automatic and manual key rotation with revocation support
- 📈 **Statistics Dashboard**: View comprehensive licensing analytics with customizable widgets
- 🎨 **Native Filament 4 Integration**: Seamlessly integrates with your existing Filament panel
- 🌍 **Multi-language Support**: Available in 9 languages (English, Italian, Spanish, German, French, Russian, Chinese, Hindi, Polish)
- 🔧 **Highly Customizable**: Flexible configuration for licensable entities and custom validation

Requirements
------------

[](#requirements)

- PHP 8.4+
- Laravel 11.0+ or Laravel 12.0+
- Filament 4.0+
- masterix21/laravel-licensing 1.0+

Installation
------------

[](#installation)

Install the package via composer:

```
composer require masterix21/laravel-licensing-filament-manager
```

The package will automatically register its service provider.

### Publishing Configuration

[](#publishing-configuration)

Optionally, you can publish the configuration file:

```
php artisan vendor:publish --tag="laravel-licensing-filament-manager-config"
```

### Publishing Migrations

[](#publishing-migrations)

If you need to customize the migrations:

```
php artisan vendor:publish --tag="laravel-licensing-filament-manager-migrations"
```

Then run the migrations:

```
php artisan migrate
```

Configuration
-------------

[](#configuration)

### Adding to your Filament Panel

[](#adding-to-your-filament-panel)

In your Filament panel configuration (typically `app/Providers/Filament/AdminPanelProvider.php`), register the plugin:

```
use LucaLongo\LaravelLicensingFilamentManager\LaravelLicensingFilamentManagerPlugin;

public function panel(Panel $panel): Panel
{
    return $panel
        // ... other panel configuration
        ->plugins([
            LaravelLicensingFilamentManagerPlugin::make()
                ->navigationGroup('License Management') // Optional: customize navigation group
                ->navigationSort(10) // Optional: set navigation position
                ->enableStatistics(true) // Optional: enable/disable statistics dashboard
                ->enableBulkActions(true) // Optional: enable/disable bulk actions
        ]);
}
```

### Configuring Licensable Entities

[](#configuring-licensable-entities)

The package allows you to configure which models in your application can have licenses attached to them. This is done through the `licensed_entities` configuration in the published config file:

```
// config/licensing-filament-manager.php

return [
    'licensed_entities' => [
        // Map your model classes to their configuration
        \App\Models\User::class => [
            'title' => 'name', // The field to display as the entity's title
            'search' => ['name', 'email'], // Fields to search when selecting entities
        ],
        \App\Models\Team::class => [
            'title' => 'name',
            'search' => ['name', 'slug'],
        ],
        \App\Models\Organization::class => [
            'title' => 'company_name',
            'search' => ['company_name', 'tax_id'],
        ],
        // Add more models as needed
    ],
];
```

When creating or editing licenses, you'll be able to select which type of entity the license is for, and then search and select the specific entity. The license table will display the entity with its configured title field.

Usage
-----

[](#usage)

Once installed and configured, the package adds the following sections to your Filament panel:

### License Scopes Resource

[](#license-scopes-resource)

Manage different license scopes with automatic key rotation and default configurations:

- **Scope Management**: Create and manage license scopes with unique identifiers
- **Key Rotation**: Configure automatic signing key rotation intervals
- **Default Settings**: Set default max usages, duration, and grace periods
- **Templates**: Associate reusable templates with scopes
- **Metadata**: Store additional configuration data

Navigate to `/admin/license-scopes` in your Filament panel.

### Licenses Resource

[](#licenses-resource)

Complete license lifecycle management:

- **License Creation**: Issue new licenses with automatic key generation
- **Entity Association**: Link licenses to users, teams, or custom entities
- **Template Application**: Apply predefined templates for consistent licensing
- **Status Management**: Track pending, active, expired, suspended states
- **Usage Monitoring**: Real-time usage tracking and remaining usage calculation
- **Key Management**: Secure key generation with optional retrieval
- **Bulk Operations**: Perform bulk actions on multiple licenses

Navigate to `/admin/licenses` in your Filament panel.

### License Templates

[](#license-templates)

Create reusable license configurations:

- **Template Hierarchy**: Create parent and child templates with inheritance
- **Feature Configuration**: Define features and entitlements
- **Trial Support**: Configure trial periods and grace periods
- **Base Configuration**: Set default values for licenses created from templates
- **Tier Levels**: Organize templates by tier for different product levels

### License Usage Resource

[](#license-usage-resource)

Track and manage license usage across devices:

- **Usage Fingerprinting**: Track unique device/installation identifiers
- **Real-time Monitoring**: See last seen timestamps and activity status
- **Client Information**: Track IP addresses, user agents, and client types
- **Revocation**: Revoke specific usage instances
- **Heartbeat Tracking**: Monitor active connections with heartbeat updates
- **Bulk Management**: Revoke multiple usages at once

Navigate to `/admin/license-usages` in your Filament panel.

### Statistics Dashboard

[](#statistics-dashboard)

Comprehensive licensing analytics with widgets:

- **License Overview**: Total licenses, active licenses, expiring soon
- **Usage Metrics**: Active usage count and seat utilization
- **Scope Statistics**: Number of active license scopes
- **Expiring Licenses**: List of licenses expiring within 30 days
- **Recent Activations**: Latest license activations and usage

Navigate to the dashboard widgets in your Filament panel.

Basic Examples
--------------

[](#basic-examples)

### Creating a License Scope with Key Rotation

[](#creating-a-license-scope-with-key-rotation)

```
use Masterix21\LaravelLicensing\Models\LicenseScope;

$scope = LicenseScope::create([
    'name' => 'Enterprise',
    'slug' => 'enterprise',
    'identifier' => 'com.yourcompany.enterprise',
    'description' => 'Enterprise license with advanced features',
    'is_active' => true,
    'default_max_usages' => 10,
    'default_duration_days' => 365,
    'default_grace_days' => 30,
    'key_rotation_days' => 90, // Rotate keys every 90 days
    'meta' => [
        'features' => ['api_access', 'priority_support', 'white_label'],
        'rate_limits' => ['api_calls' => 10000],
    ],
]);
```

### Creating a License Template

[](#creating-a-license-template)

```
use Masterix21\LaravelLicensing\Models\LicenseTemplate;

$template = LicenseTemplate::create([
    'license_scope_id' => $scope->id,
    'name' => 'Enterprise Annual',
    'slug' => 'enterprise-annual',
    'tier_level' => 3,
    'is_active' => true,
    'license_duration_days' => 365,
    'supports_trial' => true,
    'trial_duration_days' => 30,
    'has_grace_period' => true,
    'grace_period_days' => 15,
    'base_configuration' => [
        'max_usages' => 10,
    ],
    'features' => [
        'api_access' => true,
        'white_label' => true,
        'custom_branding' => true,
    ],
    'entitlements' => [
        'api_calls_per_month' => 100000,
        'storage_gb' => 500,
        'team_members' => 50,
    ],
]);
```

### Issuing a License with Template

[](#issuing-a-license-with-template)

```
use Masterix21\LaravelLicensing\Models\License;

// Create license with automatic key generation
$license = License::createWithKey([
    'license_scope_id' => $scope->id,
    'template_id' => $template->id,
    'licensable_type' => \App\Models\Organization::class,
    'licensable_id' => $organization->id,
    'max_usages' => 10,
    'expires_at' => now()->addYear(),
    'meta' => [
        'customer_name' => $organization->name,
        'invoice_number' => 'INV-2024-001',
    ],
]);

// The license key is temporarily available via:
$licenseKey = $license->temporaryLicenseKey;
```

### Tracking License Usage

[](#tracking-license-usage)

```
use Masterix21\LaravelLicensing\Models\LicenseUsage;

// Record a new usage
$usage = LicenseUsage::create([
    'license_id' => $license->id,
    'usage_fingerprint' => hash('sha256', $deviceId . $machineId),
    'client_type' => 'desktop',
    'name' => 'John\'s MacBook Pro',
    'ip' => $request->ip(),
    'user_agent' => $request->userAgent(),
    'registered_at' => now(),
    'last_seen_at' => now(),
]);

// Update heartbeat
$usage->update(['last_seen_at' => now()]);

// Check if usage is active (seen in last 7 days)
$isActive = $usage->last_seen_at->diffInDays(now()) < 7;
```

Customization
-------------

[](#customization)

### Custom License Validation

[](#custom-license-validation)

You can add custom validation logic for licenses:

```
use LucaLongo\LaravelLicensingFilamentManager\Resources\LicenseResource;

class CustomLicenseResource extends LicenseResource
{
    public static function beforeSave($record)
    {
        // Custom validation logic
        if ($record->scope->name === 'Enterprise' && !$record->user->is_verified) {
            throw new \Exception('Enterprise licenses require verified users');
        }
    }
}
```

### Extending Resources

[](#extending-resources)

All resources can be extended to add custom fields, actions, or business logic:

```
namespace App\Filament\Resources;

use LucaLongo\LaravelLicensingFilamentManager\Resources\LicenseResource as BaseResource;

class LicenseResource extends BaseResource
{
    public static function form(Schema $schema): Schema
    {
        return $schema
            ->schema([
                ...parent::getFormSchema(),
                // Add your custom fields
                Forms\Components\TextInput::make('custom_field'),
            ]);
    }
}
```

### Custom Widgets

[](#custom-widgets)

Add custom widgets to the statistics dashboard:

```
use LucaLongo\LaravelLicensingFilamentManager\Widgets\LicenseStatsWidget;

class CustomRevenueWidget extends LicenseStatsWidget
{
    protected function getStats(): array
    {
        return [
            'total_revenue' => License::sum('price'),
            'monthly_revenue' => License::whereMonth('created_at', now()->month)->sum('price'),
        ];
    }
}
```

API Integration
---------------

[](#api-integration)

The package works seamlessly with the laravel-licensing API endpoints for license validation and usage tracking:

```
// License validation endpoint
Route::post('/api/license/validate', function (Request $request) {
    $license = License::where('key_hash', hash('sha256', $request->key))->firstOrFail();

    // Check if license is valid and active
    if ($license->status !== LicenseStatus::Active) {
        return response()->json(['valid' => false, 'reason' => 'License is not active']);
    }

    if ($license->isExpired()) {
        return response()->json(['valid' => false, 'reason' => 'License has expired']);
    }

    // Check usage limits
    $currentUsages = $license->usages()->where('revoked_at', null)->count();
    if ($currentUsages >= $license->max_usages) {
        return response()->json(['valid' => false, 'reason' => 'Maximum usage limit reached']);
    }

    // Create or update usage
    $fingerprint = hash('sha256', $request->device_id . $request->machine_id);
    $usage = $license->usages()->updateOrCreate(
        ['usage_fingerprint' => $fingerprint],
        [
            'client_type' => $request->client_type ?? 'unknown',
            'name' => $request->device_name,
            'ip' => $request->ip(),
            'user_agent' => $request->userAgent(),
            'last_seen_at' => now(),
        ]
    );

    return response()->json([
        'valid' => true,
        'usage_id' => $usage->id,
        'features' => $license->template?->features ?? [],
        'entitlements' => $license->template?->entitlements ?? [],
        'expires_at' => $license->expires_at,
    ]);
});

// Heartbeat endpoint to keep usage active
Route::post('/api/license/heartbeat', function (Request $request) {
    $usage = LicenseUsage::where('id', $request->usage_id)
        ->where('usage_fingerprint', $request->fingerprint)
        ->firstOrFail();

    $usage->update(['last_seen_at' => now()]);

    return response()->json(['success' => true]);
});
```

Available Components
--------------------

[](#available-components)

The package provides several reusable components and traits:

### Resources

[](#resources)

- `LicenseResource` - Complete license management interface
- `LicenseScopeResource` - License scope administration
- `LicenseUsageResource` - Usage tracking and management
- `LicenseTemplateResource` - Template management (relation manager)

### Relation Managers

[](#relation-managers)

- `LicensesRelationManager` - Manage licenses within scope context
- `SigningKeysRelationManager` - Handle signing keys for scopes
- `TemplatesRelationManager` - Manage templates for scopes
- `UsagesRelationManager` - Track usages for specific licenses
- `TrialsRelationManager` - Manage trial periods for licenses

### Widgets

[](#widgets)

- `LicenseStatsOverview` - Overview statistics cards
- `ExpiringLicenses` - Table of licenses expiring soon
- `RecentLicenseActivations` - Latest activation activity
- `LicenseStatsWidget` - Customizable statistics widget

### Form Schemas

[](#form-schemas)

- `LicenseForm` - Reusable license form configuration
- `LicenseScopeForm` - Scope form with sections
- `LicenseUsageForm` - Usage form fields
- `LicenseTemplateForm` - Template configuration form

### Table Configurations

[](#table-configurations)

- `LicenseTable` - Comprehensive license table with filters
- `LicenseScopeTable` - Scope table with bulk actions
- `LicenseUsageTable` - Usage tracking table

Internationalization
--------------------

[](#internationalization)

The package includes complete translations for 9 languages:

- 🇬🇧 **English** (en)
- 🇮🇹 **Italian** (it)
- 🇪🇸 **Spanish** (es)
- 🇩🇪 **German** (de)
- 🇫🇷 **French** (fr)
- 🇷🇺 **Russian** (ru)
- 🇨🇳 **Chinese Simplified** (zh)
- 🇮🇳 **Hindi** (hi)
- 🇵🇱 **Polish** (pl)

### Publishing Translations

[](#publishing-translations)

To customize translations, publish the language files:

```
php artisan vendor:publish --tag="laravel-licensing-filament-manager-translations"
```

Translation files will be published to `resources/lang/vendor/laravel-licensing-filament-manager/`.

Testing
-------

[](#testing)

Run the test suite:

```
composer test
```

Run tests with coverage:

```
composer test-coverage
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please review [our security policy](../../security/policy) on how to report security vulnerabilities.

Credits
-------

[](#credits)

- [Luca Longo](https://github.com/masterix21)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

51

—

FairBetter than 95% of packages

Maintenance91

Actively maintained with recent releases

Popularity29

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity61

Established project with proven stability

 Bus Factor1

Top contributor holds 84% 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 ~101 days

Total

3

Last Release

87d ago

PHP version history (2 changes)1.0.0PHP ^8.4

1.2.0PHP ^8.3|^8.4

### Community

Maintainers

![](https://www.gravatar.com/avatar/177020fc4adb5c08acee3e6fe0b65002a96665c5d5c522a3ef009b4105fd634f?d=identicon)[masterix](/maintainers/masterix)

---

Top Contributors

[![masterix21](https://avatars.githubusercontent.com/u/6555012?v=4)](https://github.com/masterix21 "masterix21 (42 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (6 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (2 commits)")

---

Tags

laravelLuca Longolaravel-licensing-filament-manager

###  Code Quality

TestsPest

Static AnalysisPHPStan

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/masterix21-laravel-licensing-filament-manager/health.svg)

```
[![Health](https://phpackages.com/badges/masterix21-laravel-licensing-filament-manager/health.svg)](https://phpackages.com/packages/masterix21-laravel-licensing-filament-manager)
```

###  Alternatives

[rawilk/profile-filament-plugin

Profile &amp; MFA starter kit for filament.

3914.6k](/packages/rawilk-profile-filament-plugin)[stephenjude/filament-jetstream

A Laravel starter kit built with Filament inspired by Jetstream.

17760.2k3](/packages/stephenjude-filament-jetstream)[stephenjude/filament-debugger

About

104162.2k2](/packages/stephenjude-filament-debugger)[codewithdennis/filament-select-tree

The multi-level select field enables you to make single selections from a predefined list of options that are organized into multiple levels or depths.

329530.5k29](/packages/codewithdennis-filament-select-tree)[stephenjude/filament-feature-flags

Filament implementation of feature flags and segmentation with Laravel Pennant.

122177.8k1](/packages/stephenjude-filament-feature-flags)[finity-labs/fin-mail

A powerful email template manager and composer for Filament with dynamic token replacement, template versioning, and inline email sending.

284.5k1](/packages/finity-labs-fin-mail)

PHPackages © 2026

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