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. [Utility &amp; Helpers](/categories/utility)
4. /
5. a2way/laravel-tenant-migrate

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

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

A2Way Laravel Tenant Migrate

v1.11.0(6y ago)247.2k↓41.7%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 yesterday

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 83% 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

2489d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/451634?v=4)[Supun Budhajeewa](/maintainers/budhajeewa)[@budhajeewa](https://github.com/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

[grumpydictator/firefly-iii

Firefly III: a personal finances manager.

23.9k69.5k](/packages/grumpydictator-firefly-iii)[firefly-iii/data-importer

Firefly III Data Import Tool.

8035.8k](/packages/firefly-iii-data-importer)[markwalet/nova-modal-response

A Laravel Nova asset for Modal responses on an action.

17878.9k](/packages/markwalet-nova-modal-response)[ronasit/laravel-helpers

Provided helpers function and some helper class.

2085.6k31](/packages/ronasit-laravel-helpers)[team-nifty-gmbh/tall-datatables

Server-side rendered datatables for Laravel and Livewire

1320.9k4](/packages/team-nifty-gmbh-tall-datatables)[tomshaw/electricgrid

A feature-rich Livewire package designed for projects that require dynamic, interactive data tables.

119.4k](/packages/tomshaw-electricgrid)

PHPackages © 2026

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