PHPackages                             jinas123/laravel-tenant - 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. jinas123/laravel-tenant

ActiveLibrary[Framework](/categories/framework)

jinas123/laravel-tenant
=======================

Basic Multi-tenant support.

v1.0(5y ago)17MITPHPPHP ^7.1

Since Dec 21Pushed 5y ago1 watchersCompare

[ Source](https://github.com/boring-dragon/laravel-tenant)[ Packagist](https://packagist.org/packages/jinas123/laravel-tenant)[ Docs](https://github.com/boring-dragon/laravel-tenant)[ RSS](/packages/jinas123-laravel-tenant/feed)WikiDiscussions master Synced 3w ago

READMEChangelog (1)Dependencies (3)Versions (3)Used By (0)

Laravel Tenant (Belongs to tenant)
==================================

[](#laravel-tenant-belongs-to-tenant)

[![StyleCI](https://camo.githubusercontent.com/29efa69adb6b63bae115a49528cbc5ccdad65a7f2be0ac3486c12939adee7125/68747470733a2f2f6769746875622e7374796c6563692e696f2f7265706f732f3332333333383630392f736869656c643f6272616e63683d6d6173746572)](https://github.styleci.io/repos/323338609?branch=master)

This package automatically scopes the queries to a tenant. Listens for a created events and set the tenant\_id automatically. Just a test package I made would not recommend to use it

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

[](#installation)

You can install the package via composer:

```
composer require jinas123/laravel-tenant
```

Usage
-----

[](#usage)

Add the `HasTenant` trait into your user model. Make sure to add a `tenant_id` column into your user table

```
use Jinas\LaravelTenant\Traits\HasTenant;

class User extends Authenticatable
{
    use HasTenant;
}
```

Any model that uses `HasTenant` Should include `tenant_id` in their database table.

### Testing

[](#testing)

```
composer test
```

### Security

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

Credits
-------

[](#credits)

- [Mohamed Jinas](https://github.com/boring-dragon)
- [All Contributors](../../contributors)

License
-------

[](#license)

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

###  Health Score

23

—

LowBetter than 26% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity50

Maturing project, gaining track record

 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.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

2020d ago

### Community

Maintainers

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

---

Top Contributors

[![boring-dragon](https://avatars.githubusercontent.com/u/28459081?v=4)](https://github.com/boring-dragon "boring-dragon (1 commits)")

---

Tags

jinaslaravel-tenant

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/jinas123-laravel-tenant/health.svg)

```
[![Health](https://phpackages.com/badges/jinas123-laravel-tenant/health.svg)](https://phpackages.com/packages/jinas123-laravel-tenant)
```

###  Alternatives

[laravel/horizon

Dashboard and code-driven configuration for Laravel queues.

4.2k95.4M306](/packages/laravel-horizon)[laravel/sail

Docker files for running a basic Laravel application.

1.9k205.7M1.3k](/packages/laravel-sail)[laravel/ai

The official AI SDK for Laravel.

1.0k3.2M194](/packages/laravel-ai)[laravel/mcp

Rapidly build MCP servers for your Laravel applications.

77022.3M151](/packages/laravel-mcp)[illuminate/routing

The Illuminate Routing package.

1419.2M3.0k](/packages/illuminate-routing)[laravel/surveyor

Static analysis tool for Laravel applications.

86121.4k11](/packages/laravel-surveyor)

PHPackages © 2026

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