Features plugin screenshot
Dark mode ready
No multilingual support
Supports v5.x

Features by Packstub

Community

Plan-based feature flags and limits per tenant, with overrides, usage checks and gating for pages, actions and routes.

Tags: Panels Panel Authorization Developer Tool
Supported versions:
5.x
Packstub avatar Author: Packstub

Package health

Automated checks of this plugin's Composer package

100 / 100
Security 100
Maintenance 100
Ecosystem 100
15 checks
  • Passed: GitHub Actions pinned to SHA
  • Skipped: GitLab CI includes pinned to SHA
  • Passed: Open security advisories
  • Passed: Dependabot PR responsiveness — No open Dependabot PRs.
  • Skipped: Renovate MR responsiveness
  • Passed: Dependabot or Renovate configured
  • Passed: Dependency update cooldown configured
  • Passed: Provides a security policy
  • Passed: Abandoned or archived — No consulted source marks the package abandoned (packagist, github).
  • Passed: Commit and release recency — Active: last commit 0 days ago; last release 1 days ago.
  • Passed: composer.lock not committed by library — composer.lock is absent from the released dist archive.
  • Passed: Dist archive is lean
  • Passed: Current Laravel version supported — Package dependencies resolve together with current Laravel 13.0.
  • Passed: Current PHP version supported — Constraint ^8.3 supports current PHP 8.5.
  • Skipped: Current Symfony version supported
Third-party plugin. This is built by the community, not the Filament team. Filament does not review, endorse, or vet the security of plugins outside the filament/ namespace. Review the source and install at your own risk. Found malware or an unresolved security issue the author won't address? Report it .
Powered by Plumb Last scanned 1 week ago

Documentation

Filament Features — plans, limits and flags per tenant

Latest Version on Packagist Tests Total Downloads License Sponsor

Feature flags and entitlements for Filament v5 tenants: define features and plans in code, store per-tenant overrides and global kill switches, check limits against real usage, and gate pages, actions, routes and Blade with one call.

Switching from a Pro team to a Free team: the same Reports page shows an upgrade card, and Upgrade opens the plan page with its limits and usage

#Features

  • Features and plans in code: on/off features and numeric limits, bundled into plans; the plan comes from any source.
  • One call to check: whether a feature is on, its limit and what's left against real usage.
  • Gating everywhere: routes, actions, form fields, pages and Blade, with an upgrade card when something is locked.
  • Overrides: trials, beta access and custom limits per tenant, global kill switches, each with an expiry and a reason.
  • Plan and admin pages: "Your plan" with usage bars for tenants, flags and overrides for operators.
  • Works with Filament Teams: seat limits straight from the plan.
  • Caching, commands and events: a per-request memo with an optional cache store, list and prune commands, events when a limit is hit.

#Compatibility

Plugin Filament Laravel PHP
1.x 5.x 12.x, 13.x 8.3+

#Installation

composer require packstub/filament-features
php artisan packstub-features:install
use Packstub\Features\FeaturesPlugin;

$panel->plugin(
    FeaturesPlugin::make()
        ->features([
            'api_access' => ['label' => 'API access', 'type' => 'boolean', 'default' => false, 'group' => 'Integrations'],
            'projects'   => ['label' => 'Projects', 'type' => 'limit', 'default' => 3, 'unit' => 'projects'],
        ])
        ->plans([
            'free' => ['label' => 'Free', 'features' => ['projects' => 3]],
            'pro'  => ['label' => 'Pro', 'price' => '$29', 'features' => ['projects' => 50, 'api_access' => true]],
        ], default: 'free')
        ->planUsing(fn (?Team $team) => $team?->subscription?->plan)   // or a `plan` column
        ->usage('projects', fn (?Team $team) => $team?->projects()->count() ?? 0)
        ->upgradeUrl(fn (?Team $team) => route('billing', $team)),
);

Optionally add Packstub\Features\Concerns\HasFeatures to the tenant model for $team->hasFeature('api_access'), featureLimit(), featureRemaining(), canUseFeature().

#Checking

Features::active('api_access');            // current Filament tenant
Features::active('api_access', $team);
Features::limit('projects', $team);        // 50, or null = unlimited
Features::remaining('projects', $team);
Features::canUse('projects', $team);
Features::assertCanUse('projects', $team); // throws FeatureLimitReached / FeatureInactive
Features::for($team)->snapshot();          // every feature with value, source, usage
Route::get('/api/tokens', ...)->middleware('feature:api_access');          // 403
Route::get('/reports', ...)->middleware('feature:reports,redirect');       // → upgrade URL

Action::make('export')->requiresFeature('api_access');
TextInput::make('webhook_url')->requiresFeature('api_access');

class ReportsPage extends Page { use RequiresFeature; protected static string $feature = 'reports'; }
@feature('api_access') … @else … @endfeature
<x-packstub-features::locked feature="api_access" />

#Overrides

Features::enable($team, 'reports', now()->addDays(14), 'trial');
Features::override($team, 'projects', 100, reason: 'enterprise deal');
Features::override($team, 'projects', null);        // unlimited
Features::disable(null, 'api_access');              // global kill switch
Features::clearOverride($team, 'reports');

Resolution order: scope override → plan → global override → default.

#Pages

  • Plan (tenant panel, /plan) — "Your plan": features by group, usage bars, upgrade button. Disable with ->planPage(null).
  • FeatureFlags and FeatureOverrides (central/admin panel) — ->adminPages(). Open to whoever can access a panel without tenancy; on a tenant panel they stay hidden unless ->canManageUsing(fn (User $user) => ...) (or a manageFeatures Gate ability) says otherwise.

#With Filament Teams

TeamsPlugin::make()->seatLimit(fn (Team $team) => Features::limit('seats', $team));

#Configuration

See config/packstub-features.php: scope_model, features, plans, default_plan, overrides_table, connection, cache.store / ttl, upgrade_url. Anything can be overridden per panel with ->config([...]).

Commands: features:list prints every feature with its resolved value for a tenant, features:prune deletes expired overrides.

#Documentation

The same pages live in the docs/ directory of this repository.

#Testing

composer test

#Changelog

See the changelog.

#Contributing

See CONTRIBUTING.

#Security

See our security policy.

#Credits

#License

The MIT License (MIT). See LICENSE.

The author

Packstub avatar Author: Packstub

Packstub builds plugins for Filament and Laravel, from open-source utilities to paid infrastructure for multi-tenant SaaS. It is the author of Packstub Tenancy, which brings stancl/tenancy's database-per-tenant model to Filament panels, and Filament Account Switcher, which adds linked accounts, impersonation, and developer logins with an audit trail. Packstub is run by XLITE, a web development studio based in Moldova.

Plugins
15
Stars
39

From the same author