PHPackages                             keithprinkey-ops/laravel-auto-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. keithprinkey-ops/laravel-auto-tenancy

ActiveLibrary

keithprinkey-ops/laravel-auto-tenancy
=====================================

Laravel package for post-authentication multi-tenancy in which the user only needs to install the package and their laravel install becomes multi-tenant

v1.0.0(2mo ago)10[3 PRs](https://github.com/KeithPrinkey-ops/laravel-multi-tenancy/pulls)MITPHPPHP ^8.4CI passing

Since Mar 7Pushed 1mo agoCompare

[ Source](https://github.com/KeithPrinkey-ops/laravel-multi-tenancy)[ Packagist](https://packagist.org/packages/keithprinkey-ops/laravel-auto-tenancy)[ Docs](https://github.com/KeithPrinkey-ops/laravel-multi-tenancy)[ GitHub Sponsors](https://github.com/worldesports)[ RSS](/packages/keithprinkey-ops-laravel-auto-tenancy/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)Dependencies (14)Versions (4)Used By (0)

Laravel package for post-authentication multi-tenancy in which the user only needs to install the package and their laravel install becomes multi-tenant
========================================================================================================================================================

[](#laravel-package-for-post-authentication-multi-tenancy-in-which-the-user-only-needs-to-install-the-package-and-their-laravel-install-becomes-multi-tenant)

[![Latest Version on Packagist](https://camo.githubusercontent.com/571584c163859739767fd19ec94505096cb2b5dc84f6b1aebff07016bdbdd22e/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f776f726c646573706f7274732f6d756c74692d74656e616e63792e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/worldesports/multi-tenancy)[![GitHub Tests Action Status](https://camo.githubusercontent.com/280fc5b1b1427ce63f5ca0f335fed24c66127af208fe4c2ae9b64b5074353c71/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f776f726c646573706f7274732f6d756c74692d74656e616e63792f72756e2d74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/worldesports/multi-tenancy/actions?query=workflow%3Arun-tests+branch%3Amain)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/5be6c68949406831c7b4f3079241f099542f802c3a23a7e749af8b4367564f54/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f776f726c646573706f7274732f6d756c74692d74656e616e63792f6669782d7068702d636f64652d7374796c652d6973737565732e796d6c3f6272616e63683d6d61696e266c6162656c3d636f64652532307374796c65267374796c653d666c61742d737175617265)](https://github.com/worldesports/multi-tenancy/actions?query=workflow%3A%22Fix+PHP+code+style+issues%22+branch%3Amain)[![Total Downloads](https://camo.githubusercontent.com/cd5bdbcb5254c249667f675c469f285320659402b510370a2cdcababce8d2d0e/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f776f726c646573706f7274732f6d756c74692d74656e616e63792e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/worldesports/multi-tenancy)

This is where your description should go. Limit it to a paragraph or two. Consider adding a small example.

Support us
----------

[](#support-us)

[![](https://camo.githubusercontent.com/4fd0ada3d8c00b4ac5f9fb3859836c562b77f52dda9fe4cd84d2780b08343cf5/68747470733a2f2f6769746875622d6164732e73332e65752d63656e7472616c2d312e616d617a6f6e6177732e636f6d2f6d756c74692d74656e616e63792e6a70673f743d31)](https://spatie.be/github-ad-click/multi-tenancy)

We invest a lot of resources into creating [best in class open source packages](https://spatie.be/open-source). You can support us by [buying one of our paid products](https://spatie.be/open-source/support-us).

We highly appreciate you sending us a postcard from your hometown, mentioning which of our package(s) you are using. You'll find our address on [our contact page](https://spatie.be/about-us). We publish all received postcards on [our virtual postcard wall](https://spatie.be/open-source/postcards).

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

[](#installation)

You can install the package via composer:

```
composer require worldesports/multi-tenancy
```

You can publish and run the migrations with:

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

You can publish the config file with:

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

This is the contents of the published config file:

```
return [
];
```

Optionally, you can publish the views using

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

Usage
-----

[](#usage)

```
$multiTenancy = new Worldesports\MultiTenancy();
echo $multiTenancy->echoPhrase('Hello, Worldesports!');
```

Testing
-------

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please review [our security policy](../../security/policy) on how to report security vulnerabilities.

Credits
-------

[](#credits)

- [worldesports](https://github.com/keithprinkey)
- [All Contributors](../../contributors)

License
-------

[](#license)

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

###  Health Score

40

—

FairBetter than 88% of packages

Maintenance88

Actively maintained with recent releases

Popularity2

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity53

Maturing project, gaining track record

 Bus Factor1

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

66d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/89b2d7613f8f807c2b1b3bcd58dc2e36458c64fe4d09892547a91ede9dd5a6b3?d=identicon)[KeithPrinkey-ops](/maintainers/KeithPrinkey-ops)

---

Top Contributors

[![KeithPrinkey-ops](https://avatars.githubusercontent.com/u/68619799?v=4)](https://github.com/KeithPrinkey-ops "KeithPrinkey-ops (6 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (2 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (1 commits)")

---

Tags

laravelmulti-tenantzero-configauto-tenancypost-authenticationdatabase-switching

###  Code Quality

TestsPest

Static AnalysisPHPStan

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/keithprinkey-ops-laravel-auto-tenancy/health.svg)

```
[![Health](https://phpackages.com/badges/keithprinkey-ops-laravel-auto-tenancy/health.svg)](https://phpackages.com/packages/keithprinkey-ops-laravel-auto-tenancy)
```

###  Alternatives

[spatie/laravel-permission

Permission handling for Laravel 12 and up

12.9k89.8M1.0k](/packages/spatie-laravel-permission)[spatie/laravel-health

Monitor the health of a Laravel application

85810.0M83](/packages/spatie-laravel-health)[dyrynda/laravel-model-uuid

This package allows you to easily work with UUIDs in your Laravel models.

4802.8M8](/packages/dyrynda-laravel-model-uuid)[clickbar/laravel-magellan

This package provides functionality for working with the postgis extension in Laravel.

423715.4k1](/packages/clickbar-laravel-magellan)[vormkracht10/laravel-mails

Laravel Mails can collect everything you might want to track about the mails that has been sent by your Laravel app.

24149.7k](/packages/vormkracht10-laravel-mails)[laracraft-tech/laravel-useful-additions

A collection of useful Laravel additions!

58109.4k](/packages/laracraft-tech-laravel-useful-additions)

PHPackages © 2026

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