Sprout is a multitenancy package for Laravel that focuses on flexibility and seamless integration with the framework's existing conventions. Rather than forcing a specific architecture, Sprout gives you the building blocks to implement multitenancy the way your application needs it.
Tenant Identification
Sprout ships with support for five identification strategies out of the box: subdomain, path, session, HTTP header, and cookie. Each can be used independently or in combination, and you can write your own identity resolver if your use case calls for it.
Eloquent Integration
Sprout integrates directly with Eloquent without requiring you to change your workflow. Models can be defined as tenants, and related models can be scoped to one or more tenants automatically. Tenant-aware relationships, scopes, and model events are all handled by Sprout.
Service Overrides
Sprout supports tenant-specific overrides for authentication, filesystem disks, cache stores, cookies, and sessions — without touching your application config. Overrides are applied at runtime for the duration of the tenanted request and cleaned up automatically.
Database Approach
By default Sprout uses a shared database, shared schema approach, separating tenant data via foreign keys. This is sufficient for the vast majority of use cases and requires no additional infrastructure.
The Sprout Ecosystem
Sprout is the core package, but the broader ecosystem includes several companion packages currently in development:
- Sprout Bud — tenant-specific configuration for Laravel's core services (mailers, queues, cache, auth providers, and more)
- Sprout Seedling — multi-database support, built on top of Bud, for applications that need separate database or schema per tenant
- Sprout Canopy — custom domain support with DNS validation and SSL management
- Sprout Propagator — a developer kit with setup commands, make commands, and starter kit support