PHPackages                             fbnkcmaster/xtenant - 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. fbnkcmaster/xtenant

ActiveLibrary[Framework](/categories/framework)

fbnkcmaster/xtenant
===================

Make your Laravel app multi-tenant ready easily

v0.3.2-beta(5y ago)9294[13 PRs](https://github.com/FBNKCMaster/xTenant/pulls)MITPHP

Since Jun 6Pushed 3y ago2 watchersCompare

[ Source](https://github.com/FBNKCMaster/xTenant)[ Packagist](https://packagist.org/packages/fbnkcmaster/xtenant)[ RSS](/packages/fbnkcmaster-xtenant/feed)WikiDiscussions master Synced 3w ago

READMEChangelog (7)Dependencies (2)Versions (22)Used By (0)

[![xTenant Logo](xTenant_Logo.png)](xTenant_Logo.png)
=====================================================

[](#)

> ### xTenant handles everything for you to make your Laravel app multi-tenant ready with ease.
>
> [](#xtenant-handles-everything-for-you-to-make-your-laravel-app-multi-tenant-ready-with-ease)

(WARNING: This work still in beta stage, so no warranty to use it in production)

---

PHILOSOPHY
----------

[](#philosophy)

In summary: "**Plug &amp; Play**".

Who doesn't like it when "it just works" with no more steps to do and no more annoying configuration changes?

That's the aim of this package: Just "**require &amp; setup**". With no more steps, no additional configuration, and no mandatory code changing, you get your app multi-tenancy ready, and everything is handled for you to run multiple web apps with one single Laravel installation.

FEATURES
--------

[](#features)

- Easy install
- Console commands and Web interface
- Multiple databases
- Support: MySQL and SQLite
- Subdomain tenants
- Manage tenants (name, description, image): Create/Edit/Delete + Enable/Disable
- Backup &amp; restore tenants' DBs &amp; files

INSTALLATION
------------

[](#installation)

You can install this package via Composer by running this command in your terminal in the root of your project:

`composer require fbnkcmaster/xtenant`

GETTING STARTED (with an example)
---------------------------------

[](#getting-started-with-an-example)

To get started, I have prepared a demo app to test this package with it.

Go ahead and install the demo-app you can find here and come back to continue:

[ ](https://github.com/FBNKCMaster/demo-app)

If everything is ok, switch to the repo folder where you have installed demo-app

```
cd demo-app

```

Install xTenant package using composer

```
composer require fbnkcmaster/xtenant

```

USAGE
-----

[](#usage)

Here are the steps and commands you will need to use this package:

1/ First, setup the package

```
php artisan xtenant:setup

```

You will be asked to enter:

- The \[superadmin\] subdomain to be able to access SuperAdmin's web interface
- The email address and password of the SuperAdmin
- And finally, if you want to allow "www" for subdomains.

[![xTenant Setup via Console](xTenant_Setup_Console.png)](xTenant_Setup_Console.png)
====================================================================================

[](#-1)

2/ Create your first tenant

You have two options:

##### via \[ COMMANDS \]

[](#via--commands-)

```
php artisan xtenant:new

```

You will have to choose a subdomain, a name, and a description for this tenant.

If the subdomain already exists, you will be asked to edit or override it.

Then you will be asked if you want to run migrations, seeds and create a directory for this tenant.

[![xTenant Create Tenant via Console](xTenant_Create_Tenant_Console.png)](xTenant_Create_Tenant_Console.png)
============================================================================================================

[](#-2)

##### via \[ SuperAdmin Web Interface \]

[](#via--superadmin-web-interface-)

To create a new tenant or manage existing ones, you will need to access the SuperAdmin web interface:

```
http://[superadmin].demo-app.test/login

```

Enter your credentials (SuperAdmin's email address and password) to connect.

Then go ahead and click on the "Create New Tenant" red button to create your first tenant.

[![xTenant SuperAdmin Login via Web Interface](xTenant_SuperAdmin_Login_Web.png)](xTenant_SuperAdmin_Login_Web.png)
===================================================================================================================

[](#-3)

[![xTenant SuperAdmin Dashboard Web Interface](xTenant_SuperAdmin_Dashboard_Web.png)](xTenant_SuperAdmin_Dashboard_Web.png)
===========================================================================================================================

[](#-4)

[![xTenant SuperAdmin Update Settings via Web Interface](xTenant_SuperAdmin_Settings_Web.png)](xTenant_SuperAdmin_Settings_Web.png)
===================================================================================================================================

[](#-5)

[![xTenant SuperAdmin Create Tenant via Web Interface](xTenant_SuperAdmin_Create_Tenant_Web.png)](xTenant_SuperAdmin_Create_Tenant_Web.png)
===========================================================================================================================================

[](#-6)

[![xTenant SuperAdmin Edit or Delete Tenant via Web Interface](xTenant_SuperAdmin_Edit-Delete_Tenant_Web.png)](xTenant_SuperAdmin_Edit-Delete_Tenant_Web.png)
=============================================================================================================================================================

[](#-7)

3/ That's all. If everything is ok you will be able to access your tenant at:

```
http://[tenant_subdomain].demo-app.test

```

ROAD MAP
--------

[](#road-map)

- PostgreSQL and SQLServer support
- Handling Queues
- Web Console
- Manage Databases (Backups &amp; Restorations)

FAQ
---

[](#faq)

- Is it free? > Yes!
- Can I contribute? > Yes!
- How to support? > Anything you can do to help is appreciated :)

FEEDBACK
--------

[](#feedback)

Feedbacks are welcome!

Feel free to open issues or direct contact me via twitter ([@FBNKCMaster](https://twitter.com/FBNKCMaster))

CONTRIBUTION
------------

[](#contribution)

xTenant is an open source project and anyone can contribute to make it better.

So if you like the philosophy and the idea, feel free to fork, test, PR, rise issues, suggest ideas and sponsor as well :)

CREDITS
-------

[](#credits)

Big thanks to the great community of \[ Laravel + Vue.js/Alpine.js + Tailwind CSS \] especially:

- [Taylor Otwell](https://twitter.com/taylorotwell) and the team: for Laravel, the great framework
- [Tom Schlick](https://twitter.com/tomschlick): being the first to talk and bringing first insights and ideas about multi-tenancy with Laravel
- [Mohamed Said](https://twitter.com/themsaid): for his tutorials on youtube and write-ups about this complex subject
- [Adam Wathan](https://twitter.com/adamwathan) and the team: for the awesome Tailwind CSS
- [Caleb Porzio](https://twitter.com/calebporzio): for Alpine.js (really sweet alternative to Vue.js)

###  Health Score

27

—

LowBetter than 47% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity51

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 73.2% 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 ~44 days

Recently: every ~63 days

Total

7

Last Release

1953d ago

### Community

Maintainers

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

---

Top Contributors

[![FBNKCMaster](https://avatars.githubusercontent.com/u/17050551?v=4)](https://github.com/FBNKCMaster "FBNKCMaster (52 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (19 commits)")

---

Tags

laravellaravel-packagemulti-tenancymulti-tenantmulti-tenant-database

### Embed Badge

![Health badge](/badges/fbnkcmaster-xtenant/health.svg)

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

###  Alternatives

[laravel/dusk

Laravel Dusk provides simple end-to-end testing and browser automation.

1.9k39.6M297](/packages/laravel-dusk)[nineinchnick/edatatables

Grid widget for the Yii Framework, wrapper for the DataTables jQuery plugin

173.2k](/packages/nineinchnick-edatatables)[link-cloud/fast-hyperf

LinkCloud Fast Hyperf

241.2k1](/packages/link-cloud-fast-hyperf)

PHPackages © 2026

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