PHPackages                             mostbyte/multidomain - 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. mostbyte/multidomain

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

mostbyte/multidomain
====================

This is my package multidomain

v2.2.6(1mo ago)0406MITPHPPHP ^8.3CI failing

Since Jan 4Pushed 1mo ago2 watchersCompare

[ Source](https://github.com/mostbyte/multidomain)[ Packagist](https://packagist.org/packages/mostbyte/multidomain)[ Docs](https://github.com/mostbyte/multidomain)[ RSS](/packages/mostbyte-multidomain/feed)WikiDiscussions master Synced 3w ago

READMEChangelog (10)Dependencies (18)Versions (19)Used By (0)

Laravel Multidomain – Multi-tenancy package for Laravel applications
====================================================================

[](#laravel-multidomain--multi-tenancy-package-for-laravel-applications)

[![Latest Version on Packagist](https://camo.githubusercontent.com/3828c3d2b51ed7297ff42b95194faebf7016f401dfb18ca187311a3beecca6d2/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6d6f7374627974652f6d756c7469646f6d61696e2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/mostbyte/multidomain)[![GitHub Tests Action Status](https://camo.githubusercontent.com/a84f54e08b39ff6bc274df2f4fc62af83f65eddad1e41c89f4e03e2a83bc58c7/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6d6f7374627974652f6d756c7469646f6d61696e2f72756e2d74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/mostbyte/multidomain/actions?query=workflow%3Arun-tests+branch%3Amain)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/a4affdd94cc4050f24e8e8e8569781115a368e0a9eac5c96a4a50af9711c376b/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6d6f7374627974652f6d756c7469646f6d61696e2f6669782d7068702d636f64652d7374796c652d6973737565732e796d6c3f6272616e63683d6d61696e266c6162656c3d636f64652532307374796c65267374796c653d666c61742d737175617265)](https://github.com/mostbyte/multidomain/actions?query=workflow%3A%22Fix+PHP+code+style+issues%22+branch%3Amain)[![Total Downloads](https://camo.githubusercontent.com/8e1fa4349822afeb26a7bbcd6c7be0a92e36b49eff80928f28b25b1ede8fe72f/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6d6f7374627974652f6d756c7469646f6d61696e2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/mostbyte/multidomain)

This package provides full-featured multi-tenancy support for Laravel applications. It allows you to create and manage isolated database schemas or connections per tenant, simplifying the development of SaaS and modular systems.

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

[](#installation)

You can install the package via composer:

```
composer require mostbyte/multidomain
```

You can publish and run the migrations with:

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

You can publish the config file with:

```
php artisan vendor:publish --tag="multidomain-config"
```

This is the contents of the published config file:

```
return [
];
```

Optionally, you can publish the views using

```
php artisan vendor:publish --tag="multidomain-views"
```

Usage
-----

[](#usage)

```
use Mostbyte\Multidomain\Facades\Multidomain;

Multidomain::setTenant('tenant_1');
// Your tenant-specific logic here
```

### Example Workflow

[](#example-workflow)

1. Create a new schema for a tenant: ```
    php artisan schema:migrate schema
    ```
2. Run migrations for that tenant: ```
    php artisan schema:migrate migrate
    ```
3. All tenant-specific models and queries will automatically be scoped to the active schema.

Testing
-------

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog)

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

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

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

[](#security-vulnerabilities)

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

Credits
-------

[](#credits)

- [Mostbyte Team](https://github.com/mostbyte)
- [Jasur Dustmurodov](https://github.com/dorsone)
- [All Contributors](../../contributors)

License
-------

[](#license)

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

###  Health Score

48

—

FairBetter than 94% of packages

Maintenance94

Actively maintained with recent releases

Popularity15

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity62

Established project with proven stability

 Bus Factor1

Top contributor holds 70.9% 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 ~29 days

Recently: every ~0 days

Total

18

Last Release

31d ago

Major Versions

1.1.1 → 2.0.02025-11-12

PHP version history (2 changes)1.0.0PHP ^8.2

2.0.0PHP ^8.3

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/59536101?v=4)[Firdavs](/maintainers/firdavsibodullaev)[@firdavsibodullaev](https://github.com/firdavsibodullaev)

---

Top Contributors

[![Dorsone](https://avatars.githubusercontent.com/u/84617193?v=4)](https://github.com/Dorsone "Dorsone (39 commits)")[![firdavsibodullaev](https://avatars.githubusercontent.com/u/59536101?v=4)](https://github.com/firdavsibodullaev "firdavsibodullaev (10 commits)")[![azizbekvahidov](https://avatars.githubusercontent.com/u/4863547?v=4)](https://github.com/azizbekvahidov "azizbekvahidov (6 commits)")

---

Tags

laravelmultidomainMostbyte

###  Code Quality

TestsPest

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/mostbyte-multidomain/health.svg)

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

###  Alternatives

[spatie/laravel-data

Create unified resources and data transfer objects

1.8k33.0M880](/packages/spatie-laravel-data)[spatie/laravel-pdf

Create PDFs in Laravel apps

1.0k4.3M42](/packages/spatie-laravel-pdf)[codewithdennis/filament-select-tree

The multi-level select field enables you to make single selections from a predefined list of options that are organized into multiple levels or depths.

328482.0k25](/packages/codewithdennis-filament-select-tree)[nativephp/desktop

NativePHP for Desktop

38133.6k8](/packages/nativephp-desktop)[worksome/exchange

Check Exchange Rates for any currency in Laravel.

124581.3k](/packages/worksome-exchange)[rawilk/profile-filament-plugin

Profile &amp; MFA starter kit for filament.

3913.7k](/packages/rawilk-profile-filament-plugin)

PHPackages © 2026

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