PHPackages                             sprout/sprout - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. sprout/sprout

ActiveLibrary

sprout/sprout
=============

A flexible, seamless and easy to use multitenancy solution for Laravel

v1.1.1(10mo ago)3643.0k↓100%14[14 issues](https://github.com/sprout-laravel/sprout/issues)MITPHPPHP ^8.2CI passing

Since Jan 27Pushed 3mo ago9 watchersCompare

[ Source](https://github.com/sprout-laravel/sprout)[ Packagist](https://packagist.org/packages/sprout/sprout)[ GitHub Sponsors](https://github.com/ollieread)[ RSS](/packages/sprout-sprout/feed)WikiDiscussions 1.x Synced 1mo ago

READMEChangelog (6)Dependencies (5)Versions (11)Used By (0)

[![](sprout.png)](sprout.png)

[![Packagist Version](https://camo.githubusercontent.com/196a0e70c4f00d9ad5c07821d24cf718261a2c62d5a91294e6b9cb0c220e75be/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7370726f75742f7370726f7574)](https://camo.githubusercontent.com/196a0e70c4f00d9ad5c07821d24cf718261a2c62d5a91294e6b9cb0c220e75be/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7370726f75742f7370726f7574)[![Packagist PHP Version Support](https://camo.githubusercontent.com/d643cf9320560c945d7f415b72135ecc691534920aa057edca2b436ead7f0a00/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f7370726f75742f7370726f7574)](https://camo.githubusercontent.com/d643cf9320560c945d7f415b72135ecc691534920aa057edca2b436ead7f0a00/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f7370726f75742f7370726f7574)

[![GitHub](https://camo.githubusercontent.com/7fef905acd664fcc8628f01b16cebc7996e9a02283a9f14e1c6128669807b6da/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f7370726f75742d6c61726176656c2f7370726f7574)](https://camo.githubusercontent.com/7fef905acd664fcc8628f01b16cebc7996e9a02283a9f14e1c6128669807b6da/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f7370726f75742d6c61726176656c2f7370726f7574)[![Laravel](https://camo.githubusercontent.com/d7c2fec448fdf40d8e8e09e76b79c7c8ff4c3a85540fae3d60748e8a03cb7344/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c61726176656c2d31312e782d7265642e737667)](https://camo.githubusercontent.com/d7c2fec448fdf40d8e8e09e76b79c7c8ff4c3a85540fae3d60748e8a03cb7344/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c61726176656c2d31312e782d7265642e737667)[![codecov](https://camo.githubusercontent.com/fc538d13818086ef411d177e0c360f8948bfb6b5f9c14012a56a25510b1fd39e/68747470733a2f2f636f6465636f762e696f2f67682f7370726f75742d6c61726176656c2f7370726f75742f6272616e63682f312e782f67726170682f62616467652e7376673f746f6b656e3d46484a34314e514d5441)](https://codecov.io/gh/sprout-laravel/sprout)

[![Unit Tests](https://github.com/sprout-laravel/sprout/actions/workflows/tests.yml/badge.svg)](https://github.com/sprout-laravel/sprout/actions/workflows/tests.yml/badge.svg)[![Static Analysis](https://github.com/sprout-laravel/sprout/actions/workflows/static-analysis.yml/badge.svg)](https://github.com/sprout-laravel/sprout/actions/workflows/static-analysis.yml/badge.svg)

Sprout for Laravel
==================

[](#sprout-for-laravel)

A flexible, seamless, and easy to use multitenancy solution for Laravel

Sprout is a multitenancy package for Laravel that fits seamlessly into your application. It provides a whole host of features, with the flexibility to allow you to add your own. You can read all about Sprouts features and how to get started in the [documentation](https://sprout.ollieread.com/docs/1.x).

Features
--------

[](#features)

Sprout comes out of the box with the following features:

- **Tenant Identification**: Sprout can identify tenants by *subdomain*, *path*, *header*, *cookie* or session. It can do this immediately once a route is matched, or during the middleware stack.
- **Multiple Tenancies**: Sprout can handle multiple tenancies, as in multiple different models that are tenants.
- **Tenant Storage Disks**: Sprout comes with a service override that allows you to create a storage disk that always points to the current tenant's storage directory.
- **Tenant Sessions &amp; Cookies**: If you're identifying tenants via a method that uses the URL (subdomain or path), cookies, and therefore the session cookie, will be automatically scoped to the current tenant.
- **Tenant Cache Stores**: Just like with storage disks, Sprout allows you to create a cache store that always returns the current tenants cache.
- **Tenant Aware Jobs**: When a job is dispatched, Sprout will make sure that any tenancies that are active are recreated when the job is processing, along with their current tenants.
- **Tenant Password Resets**: If you're following a model where users belong to a single tenant, you'll also want to make sure that password resets are scoped to the tenant. Sprout can do this for you.
- **Automatic Scoping**: As well as all the automated scoping of storage disks, cache stores, jobs, password resets and so on, Sprout also comes with a set of functionality for automatically scoping models, during creation and querying.

There are also three upcoming first-party addons for Sprout:

- [**Sprout Bud**](https://github.com/sprout-laravel/bud): Bud allows you to manage tenant-specific configuration, with built-in support for dynamically configuring a whole of Laravels core connections and driver-based services.
- [**Sprout Seedling**](https://github.com/sprout-laravel/seedling): Seedling builds on-top of the functionality provided by Sprout Bud, to bring multi-tenant-specific database support to your Laravel application. As well as enabling the dynamic configuration of connections, it comes with a batch of supporting functionality to make managing tenant-specific databases easier.
- [**Sprout Terra**](https://github.com/sprout-laravel/terra): Terra brings *domain*-based identification to Sprout, allowing you to identify tenants based on the domain they are accessing your application from. Just like with Seedling, it also comes with a bunch of supporting functionality for dealing with tenant domains.

FAQ
---

[](#faq)

### Does Sprout support tenant-specific databases?

[](#does-sprout-support-tenant-specific-databases)

It will do through [Sprout Seedling](https://github.com/sprout-laravel/seedling), which is currently in development.

### Why are tenant-specific databases handled by an addon?

[](#why-are-tenant-specific-databases-handled-by-an-addon)

I didn't want to just provide a barebones implementation of tenant-specific database handling, as there's a lot more to think about than just changing the connection on a model. So, I wanted to provide the feature with a bunch of opt-in supporting functionality, which is why it's an addon.

### Does sprout support domain-based identification?

[](#does-sprout-support-domain-based-identification)

It will do through [Sprout Terra](https://github.com/sprout-laravel/terra), which is currently in development.

### Why are domain-based tenants handled by an addon?

[](#why-are-domain-based-tenants-handled-by-an-addon)

The same as with Seedling, I wanted to provide a bunch of supporting functionality to make managing domain-based tenants easier, which is why it's an addon.

### Why should I use Sprout over other multitenancy packages?

[](#why-should-i-use-sprout-over-other-multitenancy-packages)

It will mostly come down to preference, but I've tried to make Sprout as flexible as possible, without compromising on any features and functionality. It is built to be as seamless as possible, avoiding hacky workarounds and providing a clean API. No magic to dynamically modify things, or artificial limitations, whether side effects or not.

### Why did you build Sprout?

[](#why-did-you-build-sprout)

I found that the existing multitenancy packages for Laravel were either too opinionated, not flexible enough, or lacking in features. I wanted to build something that was flexible, feature-rich, and easy to use.

###  Health Score

49

—

FairBetter than 94% of packages

Maintenance71

Regular maintenance activity

Popularity40

Moderate usage in the ecosystem

Community14

Small or concentrated contributor base

Maturity56

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~57 days

Recently: every ~80 days

Total

7

Last Release

122d ago

Major Versions

v0.2.0-beta → v1.0.0-beta2025-02-17

### Community

Maintainers

![](https://www.gravatar.com/avatar/662649a96637829fc96fda162ef14e9f656b09ea8d696f37156e0da01cd5fa43?d=identicon)[ollieread](/maintainers/ollieread)

---

Top Contributors

[![ollieread](https://avatars.githubusercontent.com/u/469515?v=4)](https://github.com/ollieread "ollieread (196 commits)")

---

Tags

laravellaravel-multi-tenancylaravel-multi-tenantlaravel-multitenancylaravel-packagemulti-tenancymultitenancypackagephpphp8

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

### Embed Badge

![Health badge](/badges/sprout-sprout/health.svg)

```
[![Health](https://phpackages.com/badges/sprout-sprout/health.svg)](https://phpackages.com/packages/sprout-sprout)
```

###  Alternatives

[anourvalar/eloquent-serialize

Laravel Query Builder (Eloquent) serialization

11320.2M21](/packages/anourvalar-eloquent-serialize)[namu/wirechat

A Laravel Livewire messaging app for teams with private chats and group conversations.

54324.5k](/packages/namu-wirechat)[statamic-rad-pack/runway

Eloquently manage your database models in Statamic.

135192.6k5](/packages/statamic-rad-pack-runway)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
