Features by Packstub
CommunityPlan-based feature flags and limits per tenant, with overrides, usage checks and gating for pages, actions and routes.
Author:
Packstub
Package health
Automated checks of this plugin's Composer package
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.lockis 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.3supports current PHP8.5. - Skipped: Current Symfony version supported
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
.
Documentation
- Features
- Compatibility
- Installation
- Checking
- Overrides
- Pages
- With Filament Teams
- Configuration
- Documentation
- Testing
- Changelog
- Contributing
- Security
- Credits
- License
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.

#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).FeatureFlagsandFeatureOverrides(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 amanageFeaturesGate 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 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.
From the same author
Spreadsheet
Edit hundreds of Filament records like a spreadsheet: paste from Excel, fill down, undo, and one Save checked on the server.
Author:
Packstub
Nitpick
Give users a theme picker in the Filament user menu: designed themes, community themes or your own, with a default per panel.
Author:
Packstub
Rating
Star ratings for Filament: a form field, a column you can rate from, a filter, and average and distribution summaries.
Author:
Packstub
Session Replay
Session replay and live help in your panel: replays with errors marked, co-browsing, remote control and calls.
Author:
Packstub
Featured Plugins
A selection of plugins curated by the Filament team
Custom Dashboards
Let your users build and share their own dashboards with a drag-and-drop interface. Define your data sources in PHP and let them do the rest.
Filament
Advanced Tables (formerly Filter Sets)
Supercharge your tables with powerful features like user-customizable views, quick filters, multi-column sorting, advanced table searching, convenient view management, and more. Compatible with Resource Panel Tables, Relation Managers, Table Widgets, and Table Builder!
Kenneth Sese
Sharp Theme
A theme that gives panels a precise, technical look with square corners, strong borders, and clear contrast.
Filament
