PHPackages                             alessandronuunes/filament-member - 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. [Authentication &amp; Authorization](/categories/authentication)
4. /
5. alessandronuunes/filament-member

ActiveLibrary[Authentication &amp; Authorization](/categories/authentication)

alessandronuunes/filament-member
================================

A comprehensive Filament plugin for managing tenant members, invitations, and role-based access control in multi-tenant applications.

v1.0.3(3mo ago)13754↓46.4%1MITPHPPHP ^8.2|^8.3|^8.4

Since Jan 28Pushed 2mo agoCompare

[ Source](https://github.com/alessandronuunes/filament-member)[ Packagist](https://packagist.org/packages/alessandronuunes/filament-member)[ Docs](https://github.com/alessandronuunes/filament-member)[ GitHub Sponsors](https://github.com/alessandronuunes)[ RSS](/packages/alessandronuunes-filament-member/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (10)Versions (6)Used By (0)

Filament Member
===============

[](#filament-member)

[![Latest Version on Packagist](https://camo.githubusercontent.com/35e5c88f6238f6a820ca49f7f76cf3ec9eeac2c1969f5f8d9cc39b46cf84cdb4/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f616c657373616e64726f6e75756e65732f66696c616d656e742d6d656d6265722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/alessandronuunes/filament-member)[![Total Downloads](https://camo.githubusercontent.com/93984375ed05cec9c17140f0383e84cf3f64d7a80ec1df2cf1a76caf9620e7d3/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f616c657373616e64726f6e75756e65732f66696c616d656e742d6d656d6265722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/alessandronuunes/filament-member)[![License](https://camo.githubusercontent.com/b49ac54e0a0f5937128869894e6aa4678c9bbbedcc85914b1b23d11b3e56ae4b/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f616c657373616e64726f6e75756e65732f66696c616d656e742d6d656d6265722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/alessandronuunes/filament-member)

A comprehensive Filament plugin for managing tenant members, invitations, and role-based access control in multi-tenant applications.

[![Members Management Interface](screenshots/members.jpg)](screenshots/members.jpg)

Features
--------

[](#features)

- 🎯 **Member Management**: Easily manage members within your tenant/organization
- 📧 **Invitation System**: Send invitations via email or shareable links
- 🔐 **Role-Based Access**: Built-in support for roles (Owner, Admin, Member)
- 🌐 **Multi-language Support**: Includes English and Portuguese (Brazil) translations
- ⚙️ **Highly Configurable**: Customize models, tables, routes, and behavior
- 📱 **Responsive UI**: Beautiful, modern interface built with Filament
- 🔔 **Notifications**: Email notifications and in-app notifications for invitations
- ✅ **Validation**: Prevents duplicate invitations and membership conflicts

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

[](#requirements)

- PHP 8.3 or higher
- Laravel 11.x or 12.x
- Filament 4.x or 5.x

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

[](#installation)

Install the package via Composer:

```
composer require alessandronuunes/filament-member
```

Publish the configuration, migrations, and translations:

```
php artisan filament-member:install
```

Or publish them individually:

```
php artisan vendor:publish --tag=filament-member-config
php artisan vendor:publish --tag=filament-member-migrations
php artisan vendor:publish --tag=filament-member-translations
```

Run the migrations:

```
php artisan migrate
```

Then complete the setup by [configuring your User model](#user-model-required) and [registering the plugin](#register-the-plugin).

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

[](#configuration)

### Register the Plugin

[](#register-the-plugin)

Add the plugin to your Filament panel configuration:

```
use AlessandroNuunes\FilamentMember\MemberPlugin;

public function panel(Panel $panel): Panel
{
    return $panel
        ->plugins([
            MemberPlugin::make(),
        ]);
}
```

### User Model (Required)

[](#user-model-required)

The plugin enables [Filament tenancy](https://filamentphp.com/docs/panels/tenancy) on your panel. Filament will call `getTenants(Panel $panel)` on your User model to resolve which tenants the user can access. **Your User model must implement this.**

Add the `HasTenantRelations` trait and the `HasTenants` contract to your User model:

```
use Filament\Models\Contracts\FilamentUser;
use Filament\Models\Contracts\HasTenants;
use Filament\Panel;
use AlessandroNuunes\FilamentMember\Traits\HasTenantRelations;
use Illuminate\Support\Collection;

class User extends Authenticatable implements FilamentUser, HasTenants
{
    use HasTenantRelations;

    // ...
}
```

The trait provides:

- `getTenants(Panel $panel): Collection` — tenants the user owns plus tenants they are a member of
- `canAccessTenant(Model $tenant): bool` — required by Filament for tenancy
- `tenants()` — relationship for tenants owned by the user
- `memberTenants()` — relationship for tenants where the user is a member

If your app uses a different tenant model (e.g. `Organization`), set it in `config/filament-member.php` under `models.tenant`. The trait uses that configuration for relationships and table names.

### Customize Configuration

[](#customize-configuration)

Edit `config/filament-member.php` to customize:

- **Models**: Change the User, Tenant, and TenantInvite models
- **Enums**: Set a custom tenant role enum
- **Tables**: Customize database table names and relationship columns
- **Tenancy**: Filament tenancy (slug, ownership, route prefix)
- **Routes**: Invitation accept path, name, and middleware
- **Invites**: Default role, expiration days, require registration
- **Notifications**: Send invite email, queue, from address
- **Validation**: Require role on invite

Usage
-----

[](#usage)

### Managing Members

[](#managing-members)

Once installed, a "Members" page will be available in your Filament panel navigation. From there you can:

1. **Invite Members**: Add up to 5 email addresses at once with assigned roles
2. **View Members**: See all current members with their roles and join dates
3. **Manage Roles**: Change member roles (Owner, Admin, Member)
4. **Remove Members**: Remove members from the organization
5. **View Pending Invitations**: See all pending invitations and resend or cancel them

### Invitation Flow

[](#invitation-flow)

1. **Send Invitation**:

    - Individual invitations: Send to specific email addresses
    - Generic invitations: Generate a shareable link that anyone can use
2. **Accept Invitation**:

    - New users: Create an account and automatically join
    - Existing users: Login and automatically accept the invitation
3. **Notifications**:

    - Email notifications sent to invited users
    - In-app notifications for existing users

### Roles

[](#roles)

The plugin includes three default roles:

- **Owner**: Full control, cannot be removed or have role changed
- **Admin**: Can invite and remove members
- **Member**: Basic access

You can customize these roles by modifying the `TenantRole` enum.

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

[](#customization)

### Custom Models

[](#custom-models)

Update the model classes in `config/filament-member.php`:

```
'models' => [
    'user' => App\Models\User::class,
    'tenant' => App\Models\Organization::class,
    'tenant_invite' => App\Models\Invitation::class,
],
```

### Custom Roles

[](#custom-roles)

Use your own role enum by setting it in `config/filament-member.php`:

```
'enums' => [
    'tenant_role' => App\Enums\TenantRole::class,
],
```

Your enum should use string backing values (e.g. `owner`, `admin`, `member`) and implement Filament's `HasLabel` and `HasColor` for the admin UI. To add or change roles, define cases in your enum (e.g. `case Moderator = 'moderator';`).

### Custom Routes

[](#custom-routes)

Change the invitation acceptance route in `config/filament-member.php`:

```
'routes' => [
    'invite_accept_path' => '/invite/{token}/accept',
    'invite_accept_name' => 'invite.accept',
    'invite_accept_middleware' => ['signed'],
],
```

### Theme / Styling

[](#theme--styling)

If the theme file does not exist yet (e.g. `resources/css/filament/admin/theme.css`), create it by running:

```
php artisan make:filament-theme admin
```

You can specify your panel name if different. See the [Filament documentation on creating a custom theme](https://filamentphp.com/docs/4.x/styling/overview#creating-a-custom-theme) for details.

For the plugin styles to work correctly in your Filament panel, add the `@source` directive to your theme file (e.g. `resources/css/filament/admin/theme.css`):

```
@source '../../../../vendor/alessandronuunes/filament-member/resources/views/filament/**/*';
```

This ensures Tailwind scans the plugin's Blade views and generates the required CSS classes.

### Custom Views

[](#custom-views)

To override the plugin views, copy the Blade files from `vendor/alessandronuunes/filament-member/resources/views` to your project (e.g. `resources/views/vendor/filament-member`) and edit them. Your copies will take precedence over the package views.

Translations
------------

[](#translations)

The plugin includes translations for:

- English (`en`)
- Portuguese - Brazil (`pt_BR`)

To add more languages, publish the translations and add your language files:

```
php artisan vendor:publish --tag=filament-member-translations
```

After publishing, translation files are located in `lang/vendor/filament-member/{locale}/default.php`.

Database Structure
------------------

[](#database-structure)

The plugin creates three tables:

### `tenants`

[](#tenants)

- `id`
- `user_id` (owner)
- `name`
- `slug`
- `invitation_token` (nullable, for generic invite links)
- `status`
- `timestamps`

### `tenant_user` (pivot table)

[](#tenant_user-pivot-table)

- `id`
- `tenant_id`
- `user_id`
- `role`
- `timestamps`

### `tenant_invites`

[](#tenant_invites)

- `id`
- `tenant_id`
- `user_id` (inviter)
- `email`
- `token`
- `role`
- `expires_at`
- `accepted_at`
- `timestamps`

Events
------

[](#events)

The plugin dispatches the following events:

- `TenantInviteCreated`: Fired when a new invitation is created

Listeners
---------

[](#listeners)

- `SendTenantInviteNotification`: Sends email and in-app notifications
- `AcceptPendingInviteAfterLogin`: Automatically accepts pending invitations after login

Validation Rules
----------------

[](#validation-rules)

- `AlreadyMember`: Prevents inviting users who are already members

API
---

[](#api)

### ConfigHelper

[](#confighelper)

Use the `ConfigHelper` class to access configuration values:

```
use AlessandroNuunes\FilamentMember\Support\ConfigHelper;

$userModel = ConfigHelper::getUserModel();
$tenantModel = ConfigHelper::getTenantModel();
$defaultRole = ConfigHelper::getInviteConfig('default_role');
```

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

[](#contributing)

Contributions are welcome! Please feel free to submit a Pull Request.

License
-------

[](#license)

This package is open-sourced software licensed under the [MIT license](LICENSE.md).

Author
------

[](#author)

**Alessandro Nuunes**

- Email:

Support
-------

[](#support)

For issues, questions, or contributions, please open an issue on the [GitHub repository](https://github.com/alessandronuunes/filament-members).

Repository
----------

[](#repository)

- **GitHub**:
- **Issues**: [Report a bug or request a feature](https://github.com/alessandronuunes/filament-members/issues)
- **Pull Requests**: [Contribute to the project](https://github.com/alessandronuunes/filament-members/pulls)

###  Health Score

46

—

FairBetter than 93% of packages

Maintenance82

Actively maintained with recent releases

Popularity27

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity55

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 52.9% 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 ~6 days

Total

4

Last Release

90d ago

PHP version history (2 changes)v1.0.0PHP ^8.3

v1.0.1PHP ^8.2|^8.3|^8.4

### Community

Maintainers

![](https://www.gravatar.com/avatar/4d53fc7e3f13c6a03262261f5f6e670d8ae140b90878dd51eca3d18d27ab7423?d=identicon)[alessandronuunes](/maintainers/alessandronuunes)

---

Top Contributors

[![w2ca](https://avatars.githubusercontent.com/u/60580201?v=4)](https://github.com/w2ca "w2ca (18 commits)")[![alessandronuunes](https://avatars.githubusercontent.com/u/13227884?v=4)](https://github.com/alessandronuunes "alessandronuunes (16 commits)")

---

Tags

laravelrbacmembersmulti-tenancyfilamentfilament-plugininvitations

###  Code Quality

TestsPest

Static AnalysisRector

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/alessandronuunes-filament-member/health.svg)

```
[![Health](https://phpackages.com/badges/alessandronuunes-filament-member/health.svg)](https://phpackages.com/packages/alessandronuunes-filament-member)
```

###  Alternatives

[bezhansalleh/filament-shield

Filament support for `spatie/laravel-permission`.

2.8k2.9M88](/packages/bezhansalleh-filament-shield)[spatie/laravel-permission

Permission handling for Laravel 12 and up

12.9k89.8M1.0k](/packages/spatie-laravel-permission)[croustibat/filament-jobs-monitor

Background Jobs monitoring like Horizon for all drivers for FilamentPHP

254255.2k6](/packages/croustibat-filament-jobs-monitor)[diogogpinto/filament-auth-ui-enhancer

This Filament plugin empowers you to transform your auth pages with ease, allowing you to make them truly stand out. It offers a flexible alternative to the default auth pages in the Filament Panels package.

13493.9k6](/packages/diogogpinto-filament-auth-ui-enhancer)[stephenjude/filament-two-factor-authentication

Filament Two Factor Authentication: Google 2FA + Passkey Authentication

81158.7k4](/packages/stephenjude-filament-two-factor-authentication)[caresome/filament-auth-designer

Transform Filament's default auth pages into stunning, brand-ready experiences

3916.8k2](/packages/caresome-filament-auth-designer)

PHPackages © 2026

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