PHPackages                             uccellolabs/filament-tenancy - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. uccellolabs/filament-tenancy

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

uccellolabs/filament-tenancy
============================

Easy way to manage tenancy with Filament.

19PHP

Since Dec 21Pushed 3y ago1 watchersCompare

[ Source](https://github.com/uccellolabs/filament-tenancy)[ Packagist](https://packagist.org/packages/uccellolabs/filament-tenancy)[ RSS](/packages/uccellolabs-filament-tenancy/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

[![Latest Version on Packagist](https://camo.githubusercontent.com/1facc2140d22700fb73cfe63c4f2687811e9341893c24d8f0a205f68b6b0f563/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f756363656c6c6f6c6162732f66696c616d656e742d74656e616e63792e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/uccellolabs/filament-tenancy)[![Total Downloads](https://camo.githubusercontent.com/f904f6689f3be259397b4c54e50a38ea8a4bddd02c985e79333fc0e58019e39a/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f756363656c6c6f6c6162732f66696c616d656e742d74656e616e63792e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/uccellolabs/filament-tenancy)

Filament Tenancy
================

[](#filament-tenancy)

Easy way to manage tenancy with filament.

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

[](#installation)

You can install the package via composer:

```
composer require uccellolabs/filament-tenancy
```

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

[](#configuration)

Edit `app/Models/User.php` and add the following code:

```
use Uccellolabs\FilamentTenancy\Support\Traits\UserBelongsToTenant;

class User extends Authenticatable
{
    use UserBelongsToTenant;

    protected $fillable = [
        // ...
        'current_tenant_id',
    ];
}
```

Edit `app/Filament/Resources/UserResource/Pages/ListUsers.php` and add the following code:

```
use Uccellolabs\FilamentTenancy\Support\Traits\CurrentTenant;

class ListUsers extends ListRecords
{
    use CurrentTenant;

    protected function getTableQuery(): Builder
    {
        $userIds = $this->getCurrentTenant()?->users()->pluck('users.id') ?? [];

        return User::whereIn('id', $userIds);
    }
}
```

Usage
-----

[](#usage)

```
use Uccellolabs\FilamentTenancy\Support\Traits\CurrentTenant;
```

Add a column named `tenant_id` in your table and add the following code in your Model:

```
use Uccellolabs\FilamentTenancy\Support\Traits\BelongsToTenant;

class YourModel extends Model
{
    use BelongsToTenant;
}
```

Credits
-------

[](#credits)

- [Uccellolabs](https://github.com/uccellolabs)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

15

—

LowBetter than 3% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity23

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/0dd3449bee600c805043068270d8c8d1fe7db9960f76e94b660d1192dfd3b3be?d=identicon)[sardoj](/maintainers/sardoj)

---

Top Contributors

[![sardoj](https://avatars.githubusercontent.com/u/3235898?v=4)](https://github.com/sardoj "sardoj (4 commits)")

### Embed Badge

![Health badge](/badges/uccellolabs-filament-tenancy/health.svg)

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

PHPackages © 2026

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