jeffersongoncalves/filament-teams

A Filament plugin that adds multi-tenancy with Teams, memberships, and team invitations to your panels.

Maintainers

Package info

github.com/jeffersongoncalves/filament-teams

pkg:composer/jeffersongoncalves/filament-teams

Fund package maintenance!

jeffersongoncalves

Statistics

Installs: 1

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 3

3.0.0 2026-06-24 00:40 UTC

README

Filament Teams

Filament Teams

Latest Version on Packagist GitHub Tests Action Status GitHub Code Style Action Status Total Downloads License

A Filament plugin that adds multi-tenancy with Teams, memberships, and team invitations to your panels. It ships everything you need to turn a single-tenant Filament panel into a team-based, multi-tenant application: a HasTeams 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 Team model
  • 👥 Team memberships through a pivot model
  • ✉️ Team invitations with accept / cancel flow
  • 🪪 Personal team automatically created for every new user
  • 🧩 HasTeams trait wiring all tenancy contracts
  • 🛠️ Optional admin resources for Teams and Team Invitations
  • ⚙️ Publishable configuration and migrations (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:

composer require jeffersongoncalves/filament-teams:"^3.0"

You can publish and run the migrations with:

php artisan vendor:publish --tag="filament-teams-migrations"
php artisan migrate

You can publish the config file with:

php artisan vendor:publish --tag="filament-teams-config"

Usage

1. Prepare your User model

Add the HasTeams 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\HasTeams;

class User extends Authenticatable implements FilamentUser, HasDefaultTenant, HasTenants
{
    use HasTeams;
}

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\Filament\Teams\Models\Team::class,
        'team_invitation' => \JeffersonGoncalves\Filament\Teams\Models\TeamInvitation::class,
        'membership' => \JeffersonGoncalves\Filament\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.