Designing multi-tenant SaaS with Laravel
Many businesses on one platform, each seeing only its own data — enforced by the framework, not by discipline.
- Every business is a tenant, identified by its domain or its authenticated account.
- A resolver establishes the tenant context at the very start of each request.
- A global scope adds the tenant to every query, so cross-tenant reads are impossible by default.
- Plans and limits are resolved from the tenant’s subscription to switch features on or off.
Context
SuvCRM serves many water-delivery businesses from one platform; each business works in its own workspace with its own plan.
Technical challenge
One business must never see another’s customers, orders or finances — even when a developer forgets a filter.
Chosen solution
The tenant context is resolved at the start of every request and applied to data access by default; plans and limits come from the tenant’s subscription.
Trade-offs
Shared infrastructure with tenant scoping is cheaper to run and migrate than a database per business, but isolation then depends on the scoping layer — so it is enforced centrally, not query by query.
Result
32 businesses work on the platform, each in its own isolated workspace — ≈18,000 customers and ≈193,000 orders (approximate, November 2026).
All deep dives