PHPackages                             a2way/laravel-tenant-migrate - 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. a2way/laravel-tenant-migrate

ActiveLibrary

a2way/laravel-tenant-migrate
============================

A2Way Laravel Tenant Migrate

v1.11.0(6y ago)247.0k↓50%10[1 issues](https://github.com/a2way-com/laravel-tenant-migrate/issues)ISCPHPCI failing

Since Nov 8Pushed 6y ago3 watchersCompare

[ Source](https://github.com/a2way-com/laravel-tenant-migrate)[ Packagist](https://packagist.org/packages/a2way/laravel-tenant-migrate)[ RSS](/packages/a2way-laravel-tenant-migrate/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (2)Versions (18)Used By (0)

A2Way Laravel Tenant Migrate
============================

[](#a2way-laravel-tenant-migrate)

A2Way Laravel Tenant Migrate is a Laravel package that can be used to migrate different databases without editing database configuration files.

This is specially useful for SaaS (Software as a Service) web applications that stores data of each tenant in different databases. Migrating databases like that can be very hard because you might have to change your database configuration for each tenant database. As you can imagine, this is not a very scalable solution.

A2Way Laravel Tenant Migrate can help you overcome this problem.

Financial Support
-----------------

[](#financial-support)

Consider financially supporting this project at .

Commands Available
------------------

[](#commands-available)

Installing A2Way Laravel Tenant Migrate on your Laravel project will add following commands to your artisan tool.

- `migrate:tenant [connection-name] [database-name]`
- `migrate:tenant:all [connection-name] [database-prefix]`
- `migrate:tenant:install [connection-name] [database-name]`
- `migrate:tenant:refresh [connection-name] [database-name]`
- `migrate:tenant:reset [connection-name] [database-name]`
- `migrate:tenant:rollback [connection-name] [database-name]`

Each of above commands (Except `migrate:tenant:all`.) will perform the task of their cousin commands that has the similar name but for “tenant”. For an example, `migrate:tenant:refresh myConnection myDatabase` will run `migrate:refresh` on `myDatabase`, accessing it through connection details given in `myConnection`.

`migrate:tenant:all` will help you to migrate multiple tenant databases at once by specifying their prefix. For an example, if you have tenant databases named *tnt\_a*, *tnt\_b*, and *tnt\_c*, executing `migrate:tenant:all myConnection tnt_` will migrate all three databases.

Installing
----------

[](#installing)

1. Issue the following command:

```
composer require a2way/laravel-tenant-migrate ^1.0

```

2. Then add the following line to your Laravel app’s `app/config/app.php` file's `providers` sub-array.

```
A2way\LaravelTenantMigrate\LaravelTenantMigrateServiceProvider::class,

```

3. Check the installation by issuing `php artisan` command. If you are able to see the above commands in your list of commands, installation was successful.

Development Setup
-----------------

[](#development-setup)

1. Have *Docker* and *Docker Compose*.
2. Clone this repo.
3. Copy `tmp.env` file into `.env` and fill in values.
4. Copy `laravel/tmp.env` file into `.env` and fill in values (App Key and DB settings.).
5. Run `docker-compose up`.

###  Health Score

38

—

LowBetter than 85% of packages

Maintenance19

Infrequent updates — may be unmaintained

Popularity33

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity72

Established project with proven stability

 Bus Factor1

Top contributor holds 97.6% 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 ~117 days

Recently: every ~45 days

Total

16

Last Release

2436d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/853a75590e2623fee9a1f47354a7a0e77b58381c5349034da2d426f8092d35ee?d=identicon)[budhajeewa](/maintainers/budhajeewa)

---

Top Contributors

[![budhajeewa](https://avatars.githubusercontent.com/u/451634?v=4)](https://github.com/budhajeewa "budhajeewa (41 commits)")[![crissi](https://avatars.githubusercontent.com/u/3076578?v=4)](https://github.com/crissi "crissi (1 commits)")

---

Tags

laraveltenantlaravela2way

###  Code Quality

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/a2way-laravel-tenant-migrate/health.svg)

```
[![Health](https://phpackages.com/badges/a2way-laravel-tenant-migrate/health.svg)](https://phpackages.com/packages/a2way-laravel-tenant-migrate)
```

###  Alternatives

[anourvalar/eloquent-serialize

Laravel Query Builder (Eloquent) serialization

11320.2M21](/packages/anourvalar-eloquent-serialize)[api-platform/laravel

API Platform support for Laravel

59126.4k6](/packages/api-platform-laravel)[codewithdennis/larament

Larament is a time-saving starter kit to quickly launch Laravel 13.x projects. It includes FilamentPHP 5.x pre-installed and configured, along with additional tools and features to streamline your development workflow.

3691.5k](/packages/codewithdennis-larament)

PHPackages © 2026

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