jeffersongoncalves / filament-teams
A Filament plugin that adds multi-tenancy with Teams, memberships, and team invitations to your panels.
Package info
github.com/jeffersongoncalves/filament-teams
pkg:composer/jeffersongoncalves/filament-teams
Fund package maintenance!
Requires
- php: ^8.3
- filament/filament: ^5.0
- spatie/laravel-package-tools: ^1.14.0
Requires (Dev)
- larastan/larastan: ^3.0
- laravel/pint: ^1.21
- orchestra/testbench: ^10.0|^11.0
- pestphp/pest: ^3.0|^4.0
- pestphp/pest-plugin-laravel: ^3.0|^4.0
This package is auto-updated.
Last update: 2026-06-24 17:16:07 UTC
README
Filament Teams
A Filament plugin that adds multi-tenancy with Teams, memberships, and team invitations to your panels. It builds on the framework-agnostic jeffersongoncalves/laravel-teams core (models, migrations, policy and the HasTeams trait) and adds the Filament layer on top: a HasTeamsFilament trait for your User model, tenant registration and profile pages, an invitation acceptance flow, and optional admin resources to manage Teams and Team Invitations.
Features
- 🏢 Multi-tenancy backed by a
Teammodel - 👥 Team memberships through a pivot model
- ✉️ Team invitations with accept / cancel flow
- 🪪 Personal team automatically created for every new user
- 🧩
HasTeamsFilamenttrait wiring all Filament tenancy contracts - 🛠️ Optional admin resources for Teams and Team Invitations
- ⚙️ Configuration and migrations provided by
jeffersongoncalves/laravel-teams(models, tables and guard are configurable)
Compatibility
| Plugin Version | Filament | PHP | Laravel |
|---|---|---|---|
| 1.x | ^3.0 | ^8.1 | ^10.0 |
| 2.x | ^4.0 | ^8.2 | ^11.0 |
| 3.x | ^5.0 | ^8.3 | ^12.0/^13.0 |
Installation
You can install the package via composer (the jeffersongoncalves/laravel-teams core is pulled in automatically):
composer require jeffersongoncalves/filament-teams:"^3.0"
You can publish and run the migrations with:
php artisan vendor:publish --tag="teams-migrations"
php artisan migrate
You can publish the config file with:
php artisan vendor:publish --tag="teams-config"
Usage
1. Prepare your User model
Add the HasTeamsFilament trait and implement the Filament tenancy contracts on your User model. Your users table needs a current_team_id column (provided by the published migration).
use Filament\Models\Contracts\FilamentUser; use Filament\Models\Contracts\HasDefaultTenant; use Filament\Models\Contracts\HasTenants; use Illuminate\Foundation\Auth\User as Authenticatable; use JeffersonGoncalves\Filament\Teams\Concerns\HasTeamsFilament; class User extends Authenticatable implements FilamentUser, HasDefaultTenant, HasTenants { use HasTeamsFilament; }
2. Register the plugin
use JeffersonGoncalves\Filament\Teams\FilamentTeamsPlugin; public function panel(Panel $panel): Panel { return $panel ->plugins([ FilamentTeamsPlugin::make() ->tenancy() // enable tenant config (default: true) ->invitations() // register the invitation acceptance page (default: true) ->resources() // register the Teams & Team Invitations admin resources (default: false) ->tenantRoutePrefix('team'), ]); }
The plugin will automatically configure the panel tenant model, tenant registration page, tenant profile page, and the tenant middleware.
Configuration
return [ 'guard' => 'web', 'user_model' => 'App\\Models\\User', 'personal_teams' => true, 'models' => [ 'team' => \JeffersonGoncalves\Teams\Models\Team::class, 'team_invitation' => \JeffersonGoncalves\Teams\Models\TeamInvitation::class, 'membership' => \JeffersonGoncalves\Teams\Models\Membership::class, ], 'tables' => [ 'teams' => 'teams', 'memberships' => 'membership', 'team_invitations' => 'team_invitations', ], ];
Testing
composer test
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
Credits
License
The MIT License (MIT). Please see License File for more information.
