PHPackages                             sadeghpm/xshop-multitenancy - 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. sadeghpm/xshop-multitenancy

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

sadeghpm/xshop-multitenancy
===========================

v1.0(1y ago)01PHP

Since Nov 25Pushed 1y ago1 watchersCompare

[ Source](https://github.com/SadeghPM/xshop-multitenancy)[ Packagist](https://packagist.org/packages/sadeghpm/xshop-multitenancy)[ RSS](/packages/sadeghpm-xshop-multitenancy/feed)WikiDiscussions main Synced 1mo ago

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

 [![multitenancy support for xShop](resource/logo.png)](resource/logo.png)

xShop Multitenancy Package
==========================

[](#xshop-multitenancy-package)

Note

This package provides multitenancy support for xShop, facilitating the management of multiple tenant databases.

New Features
------------

[](#new-features)

- Database creation for each tenant.
- Tenant-specific migrations and seeders.
- Automatic admin user creation for tenants.

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

[](#installation)

To install the package, follow these steps:

```
composer require sadeghpm/xshop-multitenancy
```

Multitenancy Setup
------------------

[](#multitenancy-setup)

### Initial Setup

[](#initial-setup)

Run the multitenancy:setup command to configure multitenancy:

```
php artisan multitenancy:setup
```

### Change Database config

[](#change-database-config)

Add the following line to your `config/database.php` file:

```
        'landlord'=>[
            'driver' => 'sqlite',
            'database' => database_path('tenant-db.sqlite'),
            'prefix' => '',
        ],
        'tenant'=>[
            'driver' => 'sqlite',
            'database' => null,
            'prefix' => '',
        ],
```

Set active connection to tenant in `.env` file:

```
DB_CONNECTION=tenant
```

### Adding Tenants

[](#adding-tenants)

To add new tenants, use the multitenancy:create-tenant command:

```
php artisan multitenancy:create-tenant
```

This command will:

1. Ask for the tenant's name and domain.
2. Create the tenant in the database.
3. Prompt for admin user details and create the admin user for the new tenant.

### Commands Summary

[](#commands-summary)

- `multitenancy:setup`: For initial configuration and creating the first tenant.
- `multitenancy:create-tenant`: For adding new tenants.
- `multitenancy:list-tenants` : To list all tenants.

 Developed With Love! ❤️

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance40

Moderate activity, may be stable

Popularity1

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity38

Early-stage or recently created project

 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

530d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/0ecb8440161efaed64e53693c2e1de411dfef84f383585392adc01b5b62e143c?d=identicon)[SadeghPM](/maintainers/SadeghPM)

---

Top Contributors

[![SadeghPM](https://avatars.githubusercontent.com/u/9298600?v=4)](https://github.com/SadeghPM "SadeghPM (4 commits)")

### Embed Badge

![Health badge](/badges/sadeghpm-xshop-multitenancy/health.svg)

```
[![Health](https://phpackages.com/badges/sadeghpm-xshop-multitenancy/health.svg)](https://phpackages.com/packages/sadeghpm-xshop-multitenancy)
```

###  Alternatives

[trentrichardson/cakephp-shrink

Compiles, combines, and minifies javascript, coffee, less, scss, and css

1619.3k](/packages/trentrichardson-cakephp-shrink)

PHPackages © 2026

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