PHPackages                             larabeans/tenanter - 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. larabeans/tenanter

ActiveLarabeans-container[Utility &amp; Helpers](/categories/utility)

larabeans/tenanter
==================

Apiato container to add multi tenancy feature

8744PHP

Since May 28Pushed 2y ago3 watchersCompare

[ Source](https://github.com/larabeans/tenanter)[ Packagist](https://packagist.org/packages/larabeans/tenanter)[ RSS](/packages/larabeans-tenanter/feed)WikiDiscussions develop Synced today

READMEChangelogDependenciesVersions (2)Used By (0)

> [Larabeans](README.md) &gt; Tenanter

---

Tenanter
========

[](#tenanter)

> Apiato container to add multi tenancy feature

- [Overview](#overview)
- [Migrations](#migrations)
- [Seeders](#seeders)
- [TODO](#todo)

---

Overview
--------

[](#overview)

- Add functionality to manage multi-tenancy, create/add/edit
- Add functionality to activate/de-activate tenant account.
- Updates existing database structure to make it compatible with multi-tenant application

Migrations
----------

[](#migrations)

Includes migration to add `tenant_id` column in all existing database tables.

---

Seeders
-------

[](#seeders)

For seeder naming use post fix from \_1 to \_10

Includes seeders for

- tenant roles
- tenant permissions
- root admin
- tenant admin
- default root admin
- default tenant admin
- default tenant

---

USAGE
-----

[](#usage)

- Use HasTenancy traits in User, Roles, ParentModel in core/beanner ( or your own recpective models accordingly)
- Use Authentication Trait in User modes on core/beanner ( or your own recpective models accordingly)
- In User container we need to modify two requests, email validation rules as give below

    - \\app\\Containers\\AppSection\\User\\UI\\API\\Requests\\RegisterUserRequest.php
    - \\app\\Containers\\AppSection\\User\\UI\\API\\Requests\\CreateAdminRequest.php

    `'email' => 'required|email|max:40|unique:users,email,NULL,id,tenant_id,' . tenant()->getTenantKey(),`
- Update role name validation rule in AppSection/Authorization/UI/API/Requests/CreateRoleRequest.php as below `'name' => 'required|unique:' . config('permission.table_names.roles') . ',name,NULL,id,tenant_id,' . tenant()->getTenantKey() . '|min:2|max:20|no_spaces',`

---

TODO
----

[](#todo)

- Implement cli (artisan) command to add tenant column to any table (specifying table name and column type i.e. incement or uuid)
- Implement cli (artisan) command to add default tenant in database
- Remove CLI command Add TennatIdToTablesCommand
- Remove CLI command from confugurationer comtainer to add host configuration (it is already handled here
- Remove use of host\_domains from tenanter config

---

> [Larabeans](README.md) &gt; Tenanter [⬆](#tenanter)

###  Health Score

21

—

LowBetter than 19% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity17

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity31

Early-stage or recently created project

 Bus Factor1

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

### Community

Maintainers

![](https://www.gravatar.com/avatar/38af220577e9973fe55d638833a05eceef4fd34d878d9fc9b255ac654709a4c9?d=identicon)[smurtazakazmi](/maintainers/smurtazakazmi)

---

Top Contributors

[![naqvi-sajjad](https://avatars.githubusercontent.com/u/89626818?v=4)](https://github.com/naqvi-sajjad "naqvi-sajjad (130 commits)")[![smurtazakazmi](https://avatars.githubusercontent.com/u/6737194?v=4)](https://github.com/smurtazakazmi "smurtazakazmi (72 commits)")

---

Tags

apiatoapiato-containerlarabeansmulti-tenancytenancytenancy-management

### Embed Badge

![Health badge](/badges/larabeans-tenanter/health.svg)

```
[![Health](https://phpackages.com/badges/larabeans-tenanter/health.svg)](https://phpackages.com/packages/larabeans-tenanter)
```

###  Alternatives

[voku/php-hooks

A fork of the WordPress filters hook system rolled in to a class to be ported into any PHP-based system

7637.3k3](/packages/voku-php-hooks)

PHPackages © 2026

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