PHPackages                             hafael/hotel - 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. [Database &amp; ORM](/categories/database)
4. /
5. hafael/hotel

ActiveLibrary[Database &amp; ORM](/categories/database)

hafael/hotel
============

Laravel Tenant Multi-Self-Hosted-DB connections with Migration tools package for Laravel 5.1+

v1.1.4(6y ago)1542Apache-2.0PHPPHP &gt;=5.5.0

Since Sep 28Pushed 6y ago1 watchersCompare

[ Source](https://github.com/hafael/hotel)[ Packagist](https://packagist.org/packages/hafael/hotel)[ RSS](/packages/hafael-hotel/feed)WikiDiscussions master Synced yesterday

READMEChangelog (8)Dependencies (2)Versions (13)Used By (0)

hafael/hotel
============

[](#hafaelhotel)

No docs, aqui é na unha!

### Warning

[](#warning)

This package supports only Laravel 5.1+

### Installing

[](#installing)

In order to install Hotel, run the following command into your laravel root folder:

```
composer require hafael/hotel
php artisan vendor:publish --provider="Hafael\Hotel\HotelServiceProvider"

```

After installing the package, you can now register it's provider into your config/app.php file:

```
'providers' => [
    ...
    Hafael\Hotel\HotelServiceProvider::class,
]
```

### Usage

[](#usage)

Like Laravel's default migrator, this one has some commands similar to the originals. To list the available options, you can see all available options using the `php artisan list` command.

```
tenantdb            Run the database migrations
tenantdb:fresh      Drop all tables and re-run all migrations
tenantdb:install    Create the migration repository
tenantdb:make       Create a new migration file
tenantdb:refresh    Reset and re-run all migrations
tenantdb:reset      Rollback all database migrations
tenantdb:rollback   Rollback the last database migration
tenantdb:status     Show the status of each migration

```

#### Creating Migrations

[](#creating-migrations)

In order to generate an empty migration, run the following command example.

`php artisan tenantdb:make create_orders_table --create=orders`

This will create a migration class into the right directory.

To declare your table fields, just follow the usual schema build practices, this package don't make anything different there.

#### Running Migrations

[](#running-migrations)

In order to run an migration to all tenants, run the following command example.

`php artisan tenantdb:migrate --all`

`php artisan tenantdb:rollback --all`

In order to run an migration to single tenant, run the following command example.

`php artisan tenantdb:migrate --tenant=1001`

`php artisan tenantdb:rollback --tenant=1001`

###  Health Score

29

—

LowBetter than 60% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity64

Established project with proven stability

 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

Every ~28 days

Recently: every ~57 days

Total

12

Last Release

2473d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/39ad3b7c146b7ff339338b2a19ff424f1d677a9ade97faa89f8d8eb19f1439cb?d=identicon)[hafael](/maintainers/hafael)

---

Top Contributors

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

---

Tags

laravelmigrationdatabasemysqltenantmulti-tenanthotelmulti-db

### Embed Badge

![Health badge](/badges/hafael-hotel/health.svg)

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

###  Alternatives

[cybercog/laravel-clickhouse

ClickHouse migrations for Laravel

163166.8k](/packages/cybercog-laravel-clickhouse)[awssat/laravel-sync-migration

Laravel tool helps to sync migrations without refreshing the database

10923.2k](/packages/awssat-laravel-sync-migration)[dragon-code/laravel-data-dumper

Adding data from certain tables when executing the `php artisan schema:dump` console command

3418.6k](/packages/dragon-code-laravel-data-dumper)[sarfraznawaz2005/indexer

Laravel package to monitor SELECT queries and offer best possible INDEX fields.

562.7k](/packages/sarfraznawaz2005-indexer)[moharrum/laravel-adminer

Adminer database management tool for your Laravel application.

451.0k](/packages/moharrum-laravel-adminer)[codengine/laravel-custom-migrations

Custom Migrations for Laravel

131.3k](/packages/codengine-laravel-custom-migrations)

PHPackages © 2026

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