stancl/tenancy
Automatic multi-tenancy for Laravel with minimal code changes. Supports tenant identification by hostname (including second-level domains) and avoids swapping core classes or adding model traits. Ideal for SaaS apps needing seamless tenant isolation.
client1.app, client2.app) without custom middleware or model traits.acme.client1.app).seller123.shopify.com).hr.company.com, finance.company.com).tenant1.yourapp.com).Cache, Storage, or Eloquent models)./tenant1/dashboard) instead of host-based (requires custom resolver).*"This package lets us launch a multi-tenant SaaS product without building a custom tenancy system—saving 6–12 months of dev time and reducing technical debt. It handles:
client1.yourapp.com).Risk: Minimal—MIT license, battle-tested in production, and backed by a solo maintainer with a strong track record. We can pilot with 2–3 tenants in 2 weeks."*
*"This is a drop-in solution for multi-tenancy that:
tenant1.app), database isolation, and tenant resolution via hostname.queue:retry), Vite, and caching.Trade-offs:
Proposal:
Alternatives considered:
How can I help you explore Laravel packages today?