stancl/tenancy
Automatic multi-tenancy for Laravel apps with minimal code changes. Provides tenant identification (e.g., by hostname/subdomains), isolated tenant bootstrapping, and tenancy-aware database/config switching without swapping core Laravel classes or adding model traits.
Adopt if:
client1.yourapp.com) with minimal DNS/config changes.Look elsewhere if:
Schema::create events or spatie/laravel-schema-manager.For Executives:
*"stancl/tenancy lets us launch a multi-tenant SaaS without rewriting our Laravel app. It automatically isolates each customer’s data, files, and configurations by subdomain (e.g., acme.yourapp.com), so we can:
For Engineering: *"This package eliminates tenancy boilerplate in Laravel by:
Cache, Storage, etc.—just install and configure.For Security/Compliance: *"Key advantages for governance:
Tenant::findOrFail($id)->delete() drops the entire schema).
Limitation: No built-in tenant activity logging—we’d need to layer Laravel Audit or custom middleware. Worth the tradeoff for the speed gains."*How can I help you explore Laravel packages today?