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 yesterday

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 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity49

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

1968d 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/socialite

Laravel wrapper around OAuth 1 &amp; OAuth 2 libraries.

5.7k96.9M674](/packages/laravel-socialite)[laravel/horizon

Dashboard and code-driven configuration for Laravel queues.

4.2k84.2M225](/packages/laravel-horizon)[laravel/ui

Laravel UI utilities and presets.

2.7k134.9M601](/packages/laravel-ui)[laravel/jetstream

Tailwind scaffolding for the Laravel framework.

4.1k19.8M136](/packages/laravel-jetstream)[stancl/tenancy

Automatic multi-tenancy for your Laravel application.

4.3k6.6M40](/packages/stancl-tenancy)[internachi/modular

Modularize your Laravel apps

1.1k662.4k8](/packages/internachi-modular)

PHPackages © 2026

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