PHPackages                             redchamps/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. [Framework](/categories/framework)
4. /
5. redchamps/filament-tenancy

ActiveLibrary[Framework](/categories/framework)

redchamps/filament-tenancy
==========================

Tenancy multi-database integration for FilamentPHP

1.0.3(2mo ago)040↓100%MITPHPPHP ^8.1|^8.2

Since Sep 19Pushed 2mo agoCompare

[ Source](https://github.com/redchamps/filament-tenancy)[ Packagist](https://packagist.org/packages/redchamps/filament-tenancy)[ GitHub Sponsors](https://github.com/3x1io)[ RSS](/packages/redchamps-filament-tenancy/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (3)Versions (5)Used By (0)

[![Screenshot](https://raw.githubusercontent.com/tomatophp/filament-tenancy/master/arts/3x1io-tomato-tenancy.jpg)](https://raw.githubusercontent.com/tomatophp/filament-tenancy/master/arts/3x1io-tomato-tenancy.jpg)

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

[](#filament-tenancy)

[![Latest Stable Version](https://camo.githubusercontent.com/b7f4fe4cba549c7f60495de9f877497bdf69c312fe61a3c4832d41d1af69d5c2/68747470733a2f2f706f7365722e707567782e6f72672f746f6d61746f7068702f66696c616d656e742d74656e616e63792f76657273696f6e2e737667)](https://packagist.org/packages/tomatophp/filament-tenancy)[![License](https://camo.githubusercontent.com/a325660f8f1055fc3172a90c7ec2c129179fcbb4ec5238f6c3c562e5838f07a0/68747470733a2f2f706f7365722e707567782e6f72672f746f6d61746f7068702f66696c616d656e742d74656e616e63792f6c6963656e73652e737667)](https://packagist.org/packages/tomatophp/filament-tenancy)[![Downloads](https://camo.githubusercontent.com/00076f91092251d3468e109d97a04eca96ea63820803df2cbe08bd1f43326e0e/68747470733a2f2f706f7365722e707567782e6f72672f746f6d61746f7068702f66696c616d656e742d74656e616e63792f642f746f74616c2e737667)](https://packagist.org/packages/tomatophp/filament-tenancy)

Tenancy multi-database integration for FilamentPHP

Warning

We have a known problem with `route:cache` if you find a problem with multi-database connection from your tenant side you may face this problem just use `php artisan route:clear` and it will be fixed.

Screenshots
-----------

[](#screenshots)

[![Tenants](https://raw.githubusercontent.com/tomatophp/filament-tenancy/master/arts/tenants.png)](https://raw.githubusercontent.com/tomatophp/filament-tenancy/master/arts/tenants.png)[![Create](https://raw.githubusercontent.com/tomatophp/filament-tenancy/master/arts/create.png)](https://raw.githubusercontent.com/tomatophp/filament-tenancy/master/arts/create.png)[![Edit](https://raw.githubusercontent.com/tomatophp/filament-tenancy/master/arts/edit.png)](https://raw.githubusercontent.com/tomatophp/filament-tenancy/master/arts/edit.png)[![Password](https://raw.githubusercontent.com/tomatophp/filament-tenancy/master/arts/password.png)](https://raw.githubusercontent.com/tomatophp/filament-tenancy/master/arts/password.png)

Features
--------

[](#features)

- Multi Database
- Create Tenant Resource
- Sync Tenant Resource
- Password Change
- Tenant Impersonate
- Share Tenant Data
- Custom Theme For Tenant
- Livewire Component For Register New Tenant

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

[](#installation)

```
composer require redchamps/filament-tenancy
```

after install your package please run this command

```
php artisan filament-tenancy:install
```

in your `.env` add this

```
CENTRAL_DOMAIN=tomatophp.test
```

where `tomatophp.test` is your central domain, and make sure you add a root user or a user have a permission to create database, then in your main central panel add this plugin

```
use TomatoPHP\FilamentTenancy\FilamentTenancyPlugin;

->plugin(FilamentTenancyPlugin::make()->panel('app'))
```

now you need to create a panel for tenancy app

```
php artisan filament:panel
```

and make the name same as `->panel('app')`, in your tenancy app panel add this plugin

```
use TomatoPHP\FilamentTenancy\FilamentTenancyAppPlugin;

->plugin(FilamentTenancyAppPlugin::make())
```

now on your `config\database.php` add this code

```
    ...
    'connections' => [
        'dynamic' => [
            'driver' => 'mysql',
            'url' => env('DATABASE_URL'),
            'host' => env('DB_HOST', '127.0.0.1'),
            'port' => env('DB_PORT', '3306'),
            'database' => env('DB_DATABASE', 'forge'),
            'username' => env('DB_USERNAME', 'forge'),
            'password' => env('DB_PASSWORD', ''),
            'unix_socket' => env('DB_SOCKET', ''),
            'charset' => 'utf8mb4',
            'collation' => 'utf8mb4_unicode_ci',
            'prefix' => '',
            'prefix_indexes' => true,
            'strict' => true,
            'engine' => null,
            'options' => extension_loaded('pdo_mysql') ? array_filter([
                PDO::MYSQL_ATTR_SSL_CA => env('MYSQL_ATTR_SSL_CA'),
            ]) : [],
        ],
        ...
    ],
```

now run config:cache

```
php artisan config:cache
```

on your `bootstrap\app.php` add this middleware

```
use Stancl\Tenancy\Middleware\InitializeTenancyByDomain;
use Stancl\Tenancy\Middleware\InitializeTenancyBySubdomain;

->withMiddleware(function (Middleware $middleware) {
    $middleware->group('universal', [
        InitializeTenancyByDomain::class,
        InitializeTenancyBySubdomain::class,
    ]);
})
```

Allow Impersonate
-----------------

[](#allow-impersonate)

you can allow impersonate to tanent panel with 1 click by use this method on your plugin

```
use TomatoPHP\FilamentTenancy\FilamentTenancyPlugin;

->plugin(
    FilamentTenancyPlugin::make()
        ->panel('app')
        ->allowImpersonate()
)
```

Publish Assets
--------------

[](#publish-assets)

you can publish config file by use this command

```
php artisan vendor:publish --tag="filament-tenancy-config"
```

you can publish views file by use this command

```
php artisan vendor:publish --tag="filament-tenancy-views"
```

you can publish languages file by use this command

```
php artisan vendor:publish --tag="filament-tenancy-lang"
```

you can publish migrations file by use this command

```
php artisan vendor:publish --tag="filament-tenancy-migrations"
```

Other Filament Packages
-----------------------

[](#other-filament-packages)

Checkout our [Awesome TomatoPHP](https://github.com/tomatophp/awesome)

###  Health Score

42

—

FairBetter than 90% of packages

Maintenance86

Actively maintained with recent releases

Popularity11

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity51

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 51.4% 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 ~55 days

Total

4

Last Release

70d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/bd13eb4d919843ff43b8ccdb9f6225fccdb66e3d2b810818668cf084d8d392bb?d=identicon)[redchamps](/maintainers/redchamps)

---

Top Contributors

[![fadymondy](https://avatars.githubusercontent.com/u/11937812?v=4)](https://github.com/fadymondy "fadymondy (18 commits)")[![rav-redchamps](https://avatars.githubusercontent.com/u/5336201?v=4)](https://github.com/rav-redchamps "rav-redchamps (4 commits)")[![adereksisusanto](https://avatars.githubusercontent.com/u/34746706?v=4)](https://github.com/adereksisusanto "adereksisusanto (3 commits)")[![AtefR](https://avatars.githubusercontent.com/u/43242743?v=4)](https://github.com/AtefR "AtefR (3 commits)")[![xx1196](https://avatars.githubusercontent.com/u/50302178?v=4)](https://github.com/xx1196 "xx1196 (3 commits)")[![livan2r](https://avatars.githubusercontent.com/u/1828332?v=4)](https://github.com/livan2r "livan2r (2 commits)")[![redchamps](https://avatars.githubusercontent.com/u/39119624?v=4)](https://github.com/redchamps "redchamps (1 commits)")[![megoxv](https://avatars.githubusercontent.com/u/87904671?v=4)](https://github.com/megoxv "megoxv (1 commits)")

---

Tags

phplaravelmulti-tenancyfilamentphpmulti-databasetenancyfilament-pluginstomatophp

### Embed Badge

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

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

###  Alternatives

[tomatophp/filament-tenancy

Tenancy multi-database integration for FilamentPHP

603.8k](/packages/tomatophp-filament-tenancy)[stancl/tenancy

Automatic multi-tenancy for your Laravel application.

4.3k6.6M40](/packages/stancl-tenancy)[tomatophp/filament-cms

Full CMS System with support of importing integrations and multi meta functions

11410.4k4](/packages/tomatophp-filament-cms)[tomatophp/filament-ecommerce

Build your own ecommerce store with FilamentPHP with the Power of Tomato CMS Builder

964.4k1](/packages/tomatophp-filament-ecommerce)[codewithdennis/larament

Larament is a time-saving starter kit to quickly launch Laravel 13.x projects. It includes FilamentPHP 5.x pre-installed and configured, along with additional tools and features to streamline your development workflow.

3691.5k](/packages/codewithdennis-larament)[tomatophp/filament-api

Generate APIs from your filament resource using single line of code

507.1k1](/packages/tomatophp-filament-api)

PHPackages © 2026

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