A Laravel package for managing multi-tenant database schemas and migrations across single or multiple databases.
Tenanti is a Laravel package that manages multi-tenant database schemas and migrations. It solves the problem of isolating and managing tenant-specific data in SaaS applications by providing tools to handle database connections, run migrations per tenant, and automate schema setup.
Laravel developers building multi-tenant SaaS applications, such as B2B platforms, subscription services, or any system requiring isolated data per customer or organization.
Developers choose Tenanti because it integrates natively with Laravel's migration system and Eloquent, offers flexible configuration for single or multiple databases, and reduces boilerplate code for tenant management compared to custom solutions.
[Package] Multi-tenant Database Schema Manager for Laravel
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Seamlessly extends Laravel's Artisan commands and Eloquent models, as shown by custom commands like `tenanti:migrate` and observer pattern integration for automatic tenant actions.
Supports both single shared database and separate databases per tenant, configurable via driver settings with `shared` true or false in the configuration file.
Includes queued migration operations via `tenanti:queue` command to minimize performance impact during tenant provisioning, as mentioned in the features.
Provides a full suite of Artisan commands for migrations, rollbacks, resets, and even tinker per tenant, mirroring Laravel's standard migration workflow.
Requires multiple steps: publishing configs, modifying models to implement TenantProvider, setting up observers, and manual connection resolvers, which can be error-prone.
Cannot be used outside Laravel, locking developers into this framework without cross-platform support, as evident from version compatibility tables and Laravel-specific dependencies.
Dynamic database connections require custom code in service providers for resolvers, adding boilerplate and complexity, as shown in the multi-database setup example.