spatie/laravel-multitenancy
Make your Laravel app usable by multiple tenants
4.2.0
3.8M downloads/mo
#1493 most downloaded on Packagist
spatie/laravel-multitenancy
What this package is like to depend on
Last release 16 days ago
07 Aug 2026
Release timing varies
gaps range from 9 days to 5 months
Most releases are documented
notes for 58 of 68 stable releases
Nothing withdrawn
no release was ever pulled
6 years old
68 releases · first in 2020
11 releases in the last 12 months
see the full history below
Release timeline
68 releases · May 2020 to Aug 2026Releases
latest 60 of 68-
4.2.007 Aug 2026Release notes
Open source →What's Changed
Processing a job no longer leaves the surrounding code with a different current tenant than it had before (#639, #643).
On the
syncconnection and throughdispatchSync(), a job runs inside the request that dispatched it. A job that is not tenant aware forgot the current tenant and never put it back, so the rest of the request continued without one. A tenant aware job for another tenant left that other tenant current. Whatever tenant was current before a job starts is now restored when it finishes, on both the success and the failure path, and nested sync dispatches restore per level.queue:retrybehaves the same way. It needs the tenant of a failed job while it pushes that job back onto the queue, but the tenant of the code that ran the command is restored once it finishes. This matters when retrying jobs from a request withArtisan::call('queue:retry').Behaviour worth knowing about when upgrading: on a queue worker the tenant of a processed job no longer stays current after that job finishes. Every job binds its own tenant, so jobs are unaffected, but code reading
Tenant::current()in between jobs now sees no tenant. Listeners that are part of processing a job,Queue::after()andJobFailedfor instance, still see the tenant of the job they are handling.- Update actions/checkout to v7 (#644)
Full Changelog: 4.1.5...4.2.0
Release notes
Open source →What's Changed
Processing a job no longer leaves the surrounding code with a different current tenant than it had before (#639, #643).
On the
syncconnection and throughdispatchSync(), a job runs inside the request that dispatched it. A job that is not tenant aware forgot the current tenant and never put it back, so the rest of the request continued without one. A tenant aware job for another tenant left that other tenant current. Whatever tenant was current before a job starts is now restored when it finishes, on both the success and the failure path, and nested sync dispatches restore per level.queue:retrybehaves the same way. It needs the tenant of a failed job while it pushes that job back onto the queue, but the tenant of the code that ran the command is restored once it finishes. This matters when retrying jobs from a request withArtisan::call('queue:retry').Behaviour worth knowing about when upgrading: on a queue worker the tenant of a processed job no longer stays current after that job finishes. Every job binds its own tenant, so jobs are unaffected, but code reading
Tenant::current()in between jobs now sees no tenant. Listeners that are part of processing a job,Queue::after()andJobFailedfor instance, still see the tenant of the job they are handling.- Update actions/checkout to v7 (#644)
Full Changelog: https://github.com/spatie/laravel-multitenancy/compare/4.1.5...4.2.0
-
4.1.522 Jul 2026Release notes
Open source →What's Changed
- Fix tenant id retrival during job retry by @gazben in https://github.com/spatie/laravel-multitenancy/pull/642
Full Changelog: https://github.com/spatie/laravel-multitenancy/compare/4.1.4...4.1.5
-
4.1.417 Jul 2026Release notes
Open source →What's Changed
- Support legacy queue payloads in tenant-awareness detection by @ragulka in https://github.com/spatie/laravel-multitenancy/pull/640
New Contributors
- @ragulka made their first contribution in https://github.com/spatie/laravel-multitenancy/pull/640
Full Changelog: https://github.com/spatie/laravel-multitenancy/compare/4.1.3...4.1.4
-
4.1.322 May 2026Release notes
Open source →What's Changed
- Resolve tenant from payload context when retrying jobs by @freekmurze in #638
Full Changelog: 4.1.2...4.1.3
Release notes
Open source →What's Changed
- Resolve tenant from payload context when retrying jobs by @freekmurze in https://github.com/spatie/laravel-multitenancy/pull/638
Full Changelog: https://github.com/spatie/laravel-multitenancy/compare/4.1.2...4.1.3
-
4.1.213 May 2026Release notes
Open source →What's Changed
- Add Laravel Boost skill by @victoryoalli in #635
New Contributors
- @victoryoalli made their first contribution in #635
Full Changelog: 4.1.1...4.1.2
Release notes
Open source →What's Changed
- Add Laravel Boost skill by @victoryoalli in https://github.com/spatie/laravel-multitenancy/pull/635
New Contributors
- @victoryoalli made their first contribution in https://github.com/spatie/laravel-multitenancy/pull/635
Full Changelog: https://github.com/spatie/laravel-multitenancy/compare/4.1.1...4.1.2
-
4.1.112 Apr 2026Release notes
Open source →What's Changed
- Add description to TenantsArtisanCommand by @dac514 in https://github.com/spatie/laravel-multitenancy/pull/633
New Contributors
- @dac514 made their first contribution in https://github.com/spatie/laravel-multitenancy/pull/633
Full Changelog: https://github.com/spatie/laravel-multitenancy/compare/4.1.0...4.1.1
-
4.1.022 Feb 2026Nothing published for this version
-
4.0.909 Feb 2026Release notes
Open source →What's Changed
- Fix #617: Add default value for TasksCollection constructor parameter by @freekmurze in #625
- Fix #620: Handle JobRetryRequested in queue tenant awareness by @freekmurze in #624
Full Changelog: 4.0.8...4.0.9
Release notes
Open source →What's Changed
- Fix #617: Add default value for TasksCollection constructor parameter by @freekmurze in https://github.com/spatie/laravel-multitenancy/pull/625
- Fix #620: Handle JobRetryRequested in queue tenant awareness by @freekmurze in https://github.com/spatie/laravel-multitenancy/pull/624
Full Changelog: https://github.com/spatie/laravel-multitenancy/compare/4.0.8...4.0.9
-
4.0.809 Feb 2026Release notes
Open source →What's Changed
- Fix tenant context not being restored when exception occurs in
execute()by @moisish in https://github.com/spatie/laravel-multitenancy/pull/622 - Bump minimum testbench to ^9.1.4 to fix
$latestResponseerror on prefer-lowest - Fix notification test assertions for Laravel 11/12 compatibility
New Contributors
- @moisish made their first contribution in https://github.com/spatie/laravel-multitenancy/pull/622
Full Changelog: https://github.com/spatie/laravel-multitenancy/compare/4.0.7...4.0.8
- Fix tenant context not being restored when exception occurs in
-
4.0.726 Sep 2025Release notes
Open source →What's Changed
- Fix syntax for tenant aware interface config by @danharrin in #608
New Contributors
- @danharrin made their first contribution in #608
Full Changelog: 4.0.6...4.0.7
Release notes
Open source →What's Changed
- Fix syntax for tenant aware interface config by @danharrin in https://github.com/spatie/laravel-multitenancy/pull/608
New Contributors
- @danharrin made their first contribution in https://github.com/spatie/laravel-multitenancy/pull/608
Full Changelog: https://github.com/spatie/laravel-multitenancy/compare/4.0.6...4.0.7
-
4.0.626 Sep 2025Release notes
Open source →What's Changed
- Command state persistence with
TenantAwareby @SethSharp in https://github.com/spatie/laravel-multitenancy/pull/602 - Add types to TenantCollection by @markieo1 in https://github.com/spatie/laravel-multitenancy/pull/596
- Update issue template by @AlexVanderbist in https://github.com/spatie/laravel-multitenancy/pull/603
- feat: Add configuration option to specify
TenantAwareandNotTenantAwareinterfaces by @przemyslaw-przylucki in https://github.com/spatie/laravel-multitenancy/pull/607
New Contributors
- @SethSharp made their first contribution in https://github.com/spatie/laravel-multitenancy/pull/602
- @markieo1 made their first contribution in https://github.com/spatie/laravel-multitenancy/pull/596
- @przemyslaw-przylucki made their first contribution in https://github.com/spatie/laravel-multitenancy/pull/607
Full Changelog: https://github.com/spatie/laravel-multitenancy/compare/4.0.5...4.0.6
- Command state persistence with
-
4.0.512 May 2025Release notes
Open source →What's Changed
- Update using-multiple-databases.md by @najbo in https://github.com/spatie/laravel-multitenancy/pull/584
- [Bugfix]: Jobs with
ShouldBeEncryptedneed to be decrypted by @Joel-Jensen in https://github.com/spatie/laravel-multitenancy/pull/588
New Contributors
- @najbo made their first contribution in https://github.com/spatie/laravel-multitenancy/pull/584
- @Joel-Jensen made their first contribution in https://github.com/spatie/laravel-multitenancy/pull/588
Full Changelog: https://github.com/spatie/laravel-multitenancy/compare/4.0.4...4.0.5
-
4.0.420 Feb 2025Release notes
Open source →What's Changed
- Laravel 12.x Compatibility by @laravel-shift in https://github.com/spatie/laravel-multitenancy/pull/580
Full Changelog: https://github.com/spatie/laravel-multitenancy/compare/4.0.3...4.0.4
-
4.0.322 Dec 2024Release notes
Open source →What's Changed
- Docs: Fix formatting in interface code block by @inmanturbo in https://github.com/spatie/laravel-multitenancy/pull/560
- Show name of the job in the Exception by @michaelnabil230 in https://github.com/spatie/laravel-multitenancy/pull/570
New Contributors
- @michaelnabil230 made their first contribution in https://github.com/spatie/laravel-multitenancy/pull/570
Full Changelog: https://github.com/spatie/laravel-multitenancy/compare/4.0.2...4.0.3
-
4.0.223 Aug 2024Release notes
Open source →What's Changed
- Update using-a-custom-tenant-model.md by @thoresuenert in https://github.com/spatie/laravel-multitenancy/pull/553
- Fix an exception when requiring a tenant to be active to unserialize a model
New Contributors
- @thoresuenert made their first contribution in https://github.com/spatie/laravel-multitenancy/pull/553
Full Changelog: https://github.com/spatie/laravel-multitenancy/compare/4.0.1...4.0.2
-
4.0.119 Aug 2024Release notes
Open source →- Fix NotTenantAware notifications, mailables, closures, listeners & broadcast events in a default tenant aware application
Full Changelog: https://github.com/spatie/laravel-multitenancy/compare/4.0.0...4.0.1
-
4.0.024 Jul 2024Release notes
Open source →What's Changed
- Refactor registerTenantFinder method to reduce complexity by @misaf in https://github.com/spatie/laravel-multitenancy/pull/536
- Contract IsTenant replace Tenant uses by @masterix21 in https://github.com/spatie/laravel-multitenancy/pull/544
New Contributors
- @misaf made their first contribution in https://github.com/spatie/laravel-multitenancy/pull/536
Full Changelog: https://github.com/spatie/laravel-multitenancy/compare/3.2.0...4.0.0
-
3.2.012 Mar 2024Release notes
Open source →What's Changed
- Laravel 11.x Compatibility by @laravel-shift in https://github.com/spatie/laravel-multitenancy/pull/522
New Contributors
- @laravel-shift made their first contribution in https://github.com/spatie/laravel-multitenancy/pull/522
Full Changelog: https://github.com/spatie/laravel-multitenancy/compare/3.1.1...3.2.0
-
3.1.109 Jan 2024Release notes
Open source →What's Changed
- Update migration stub by @sevannerse in https://github.com/spatie/laravel-multitenancy/pull/495
- Correct Typos by @jacobmllr95 in https://github.com/spatie/laravel-multitenancy/pull/501
- Add new
TenantNotFoundForRequestEventby @jacobmllr95 in https://github.com/spatie/laravel-multitenancy/pull/502
New Contributors
- @sevannerse made their first contribution in https://github.com/spatie/laravel-multitenancy/pull/495
- @jacobmllr95 made their first contribution in https://github.com/spatie/laravel-multitenancy/pull/501
Full Changelog: https://github.com/spatie/laravel-multitenancy/compare/3.1.0...3.1.1
-
3.1.027 Sep 2023Release notes
Open source →What's Changed
- Add support to queued closures by @masterix21 in https://github.com/spatie/laravel-multitenancy/pull/492
Full Changelog: https://github.com/spatie/laravel-multitenancy/compare/3.0.3...3.1.0
-
3.0.330 Jun 2023Release notes
Open source →What's Changed
- [no ci] Fix typo in config comment by @inmanturbo in https://github.com/spatie/laravel-multitenancy/pull/454
- [FIX] unmatched double quote (typo) by @inmanturbo in https://github.com/spatie/laravel-multitenancy/pull/459
- [FIX] Bind or forget current tenant by @raymadrona in https://github.com/spatie/laravel-multitenancy/pull/471
New Contributors
- @inmanturbo made their first contribution in https://github.com/spatie/laravel-multitenancy/pull/454
- @raymadrona made their first contribution in https://github.com/spatie/laravel-multitenancy/pull/471
Full Changelog: https://github.com/spatie/laravel-multitenancy/compare/3.0.2...3.0.3
-
3.0.209 Feb 2023Release notes
Open source →What's Changed
- Fresh Tenant on each job by @masterix21 in https://github.com/spatie/laravel-multitenancy/pull/438
Full Changelog: https://github.com/spatie/laravel-multitenancy/compare/3.0.1...3.0.2
-
3.0.103 Feb 2023Release notes
Open source →What's Changed
- Correct doc url version for v3 by @l3aro in https://github.com/spatie/laravel-multitenancy/pull/412
- docs: update composer command for install by @alexrififi in https://github.com/spatie/laravel-multitenancy/pull/413
- Add PHP 8.2 Support by @patinthehat in https://github.com/spatie/laravel-multitenancy/pull/424
- Update broken shield badge by @erikn69 in https://github.com/spatie/laravel-multitenancy/pull/437
- Laravel 10.x Support by @erikn69 in https://github.com/spatie/laravel-multitenancy/pull/435
New Contributors
- @l3aro made their first contribution in https://github.com/spatie/laravel-multitenancy/pull/412
- @patinthehat made their first contribution in https://github.com/spatie/laravel-multitenancy/pull/424
- @erikn69 made their first contribution in https://github.com/spatie/laravel-multitenancy/pull/437
Full Changelog: https://github.com/spatie/laravel-multitenancy/compare/3.0.0...3.0.1
-
3.0.031 Oct 2022Release notes
Open source →Breaking change
NotTenantAwarejobs will now forget any current tenant that might have been set when starting processing.
-
2.3.930 Oct 2022Release notes
Open source →- Fix an issue where the
Illuminate\Cache\Repositorywas not being cleared from the container
Full Changelog: https://github.com/spatie/laravel-multitenancy/compare/2.3.8...2.3.9
- Fix an issue where the
-
2.3.808 Sep 2022Release notes
Open source →What's Changed
- Replace id with getKey() so uuids could be used as primary keys by @lartisan in https://github.com/spatie/laravel-multitenancy/pull/392
New Contributors
- @lartisan made their first contribution in https://github.com/spatie/laravel-multitenancy/pull/392
Full Changelog: https://github.com/spatie/laravel-multitenancy/compare/2.3.7...2.3.8
-
2.3.701 Jul 2022Release notes
Open source →What's Changed
- Prefix Cache Task - Cache Store by @moisish in https://github.com/spatie/laravel-multitenancy/pull/374
New Contributors
- @moisish made their first contribution in https://github.com/spatie/laravel-multitenancy/pull/374
Full Changelog: https://github.com/spatie/laravel-multitenancy/compare/2.3.6...2.3.7
-
2.3.605 May 2022Nothing published for this version
-
2.3.508 Apr 2022Nothing published for this version
-
2.3.430 Mar 2022Nothing published for this version
-
2.3.328 Feb 2022Release notes
Open source →- docs: change method visibility in example by @medvinator in https://github.com/spatie/laravel-multitenancy/pull/326
- added ; in the php code by @MJunaidAhmad in https://github.com/spatie/laravel-multitenancy/pull/329
- Removing typehint for compatibility by @telkins in https://github.com/spatie/laravel-multitenancy/pull/336
Full Changelog: https://github.com/spatie/laravel-multitenancy/compare/2.3.2...2.3.3
-
2.3.219 Jan 2022 -
2.3.129 Nov 2021Release notes
Open source →- Reload Router instance when switching route cache on Laravel Octane by @AlexVanderbist in https://github.com/spatie/laravel-multitenancy/pull/309
Full Changelog: https://github.com/spatie/laravel-multitenancy/compare/2.3.0...2.3.1
-
2.3.026 Nov 2021Release notes
Open source →- Add route cache path switcher by @AlexVanderbist in https://github.com/spatie/laravel-multitenancy/pull/308
Full Changelog: https://github.com/spatie/laravel-multitenancy/compare/2.2.0...2.3.0
-
2.2.026 Oct 2021Release notes
Open source →- Handle JobRetryRequested queue event and fix (#259)
- 🐛 tenants:artisan backslashes (#296)
-
2.1.118 Aug 2021 -
2.1.004 May 2021 -
2.0.012 Mar 2021 -
1.8.118 Feb 2021Nothing published for this version
-
1.8.018 Feb 2021Nothing published for this version
-
1.7.018 Jan 2021Nothing published for this version
-
1.6.1117 Dec 2020 -
1.6.1003 Dec 2020 -
1.6.927 Sep 2020 -
1.6.824 Sep 2020 -
1.6.708 Sep 2020 -
1.6.624 Aug 2020 -
1.6.521 Aug 2020 -
1.6.411 Aug 2020 -
1.6.307 Aug 2020 -
1.6.207 Aug 2020 -
1.6.106 Aug 2020 -
1.6.006 Aug 2020 -
1.5.130 Jul 2020 -
1.5.024 Jul 2020 -
1.4.002 Jul 2020 -
1.3.026 Jun 2020 -
1.2.021 Jun 2020 -
1.1.521 Jun 2020 -
1.1.417 Jun 2020