PackageTrack
Sign in Get early access

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 2026
2021 2022 2023 2024 2025 2026
Release Pre-release

Releases

latest 60 of 68
  1. 4.2.0 07 Aug 2026
    Release notes

    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 sync connection and through dispatchSync(), 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:retry behaves 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 with Artisan::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() and JobFailed for 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

    Open source →
    Release notes

    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 sync connection and through dispatchSync(), 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:retry behaves 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 with Artisan::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() and JobFailed for 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

    Open source →
  2. 4.1.5 22 Jul 2026
    Release notes

    What's Changed

    • Fix tenant id retrival during job retry by @gazben in #642

    Full Changelog: 4.1.4...4.1.5

    Open source →
    Release notes

    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

    Open source →
  3. 4.1.4 17 Jul 2026
    Release notes

    What's Changed

    • Support legacy queue payloads in tenant-awareness detection by @ragulka in #640

    New Contributors

    Full Changelog: 4.1.3...4.1.4

    Open source →
    Release notes

    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

    Open source →
  4. 4.1.3 22 May 2026
    Release notes

    What's Changed

    • Resolve tenant from payload context when retrying jobs by @freekmurze in #638

    Full Changelog: 4.1.2...4.1.3

    Open source →
    Release notes

    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

    Open source →
  5. 4.1.2 13 May 2026
    Release notes

    What's Changed

    New Contributors

    Full Changelog: 4.1.1...4.1.2

    Open source →
    Release notes

    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

    Open source →
  6. 4.1.1 12 Apr 2026
    Release notes

    What's Changed

    • Add description to TenantsArtisanCommand by @dac514 in #633

    New Contributors

    Full Changelog: 4.1.0...4.1.1

    Open source →
    Release notes

    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

    Open source →
  7. 4.1.0 22 Feb 2026

    Nothing published for this version

  8. 4.0.9 09 Feb 2026
    Release notes

    What's Changed

    Full Changelog: 4.0.8...4.0.9

    Open source →
    Release notes

    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

    Open source →
  9. 4.0.8 09 Feb 2026
    Release notes

    Co-Authored-By: Claude Opus 4.6 [email protected]

    Open source →
    Release notes

    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 $latestResponse error 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

    Open source →
  10. 4.0.7 26 Sep 2025
    Release notes

    What's Changed

    New Contributors

    Full Changelog: 4.0.6...4.0.7

    Open source →
    Release notes

    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

    Open source →
  11. 4.0.6 26 Sep 2025
    Release notes

    What's Changed

    • Command state persistence with TenantAware by @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 TenantAware and NotTenantAware interfaces 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

    Open source →
  12. 4.0.5 12 May 2025
    Release notes

    What's Changed

    • Update using-multiple-databases.md by @najbo in https://github.com/spatie/laravel-multitenancy/pull/584
    • [Bugfix]: Jobs with ShouldBeEncrypted need 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

    Open source →
  13. 4.0.4 20 Feb 2025
    Release notes

    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

    Open source →
  14. 4.0.3 22 Dec 2024
    Release notes

    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

    Open source →
  15. 4.0.2 23 Aug 2024
    Release notes

    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

    Open source →
  16. 4.0.1 19 Aug 2024
    Release notes
    • 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

    Open source →
  17. 4.0.0 24 Jul 2024
    Release notes

    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

    Open source →
  18. 3.2.0 12 Mar 2024
    Release notes

    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

    Open source →
  19. 3.1.1 09 Jan 2024
    Release notes

    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 TenantNotFoundForRequestEvent by @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

    Open source →
  20. 3.1.0 27 Sep 2023
    Release notes

    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

    Open source →
  21. 3.0.3 30 Jun 2023
    Release notes

    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

    Open source →
  22. 3.0.2 09 Feb 2023
    Release notes

    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

    Open source →
  23. 3.0.1 03 Feb 2023
    Release notes

    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

    Open source →
  24. 3.0.0 31 Oct 2022
    Release notes

    Breaking change

    • NotTenantAware jobs will now forget any current tenant that might have been set when starting processing.
    Open source →
  25. 2.3.9 30 Oct 2022
    Release notes
    • Fix an issue where the Illuminate\Cache\Repository was not being cleared from the container

    Full Changelog: https://github.com/spatie/laravel-multitenancy/compare/2.3.8...2.3.9

    Open source →
  26. 2.3.8 08 Sep 2022
    Release notes

    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

    Open source →
  27. 2.3.7 01 Jul 2022
    Release notes

    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

    Open source →
  28. 2.3.6 05 May 2022

    Nothing published for this version

  29. 2.3.5 08 Apr 2022

    Nothing published for this version

  30. 2.3.4 30 Mar 2022

    Nothing published for this version

  31. 2.3.3 28 Feb 2022
    Release notes
    • 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

    Open source →
  32. 2.3.2 19 Jan 2022
    Release notes
    • add support for Laravel 9
    Open source →
  33. 2.3.1 29 Nov 2021
    Release notes
    • 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

    Open source →
  34. 2.3.0 26 Nov 2021
    Release notes
    • 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

    Open source →
  35. 2.2.0 26 Oct 2021
    Release notes
    • Handle JobRetryRequested queue event and fix (#259)
    • 🐛 tenants:artisan backslashes (#296)
    Open source →
  36. 2.1.1 18 Aug 2021
    Release notes
    • add filterCurrent and rejectCurrent to TenantCollection (#275)
    Open source →
  37. 2.1.0 04 May 2021
    Release notes
    • add Laravel Octane support
    Open source →
  38. 2.0.0 12 Mar 2021
    Release notes
    • drop support for PHP 7
    Open source →
  39. 1.8.1 18 Feb 2021

    Nothing published for this version

  40. 1.8.0 18 Feb 2021

    Nothing published for this version

  41. 1.7.0 18 Jan 2021

    Nothing published for this version

  42. 1.6.11 17 Dec 2020
    Release notes
    • allow PHP 8
    Open source →
  43. 1.6.10 03 Dec 2020
    Release notes
    • NeedsTenant ability to return or redirect
    Open source →
  44. 1.6.9 27 Sep 2020
    Release notes
    • fix for BroadcastEvent (#142)
    Open source →
  45. 1.6.8 24 Sep 2020
    Release notes
    • add ability to dispatch events tenant aware
    Open source →
  46. 1.6.7 08 Sep 2020
    Release notes
    • add support for Laravel 8
    Open source →
  47. 1.6.6 24 Aug 2020
    Release notes
    • restored check isCurrent from makeCurrent
    Open source →
  48. 1.6.5 21 Aug 2020
    Release notes
    • 🐛 removed check isCurrent from makeCurrent
    Open source →
  49. 1.6.4 11 Aug 2020
    Release notes
    • forget current when making new tenant current
    Open source →
  50. 1.6.3 07 Aug 2020
    Release notes
    • removed $guarded from Tenant model
    Open source →
  51. 1.6.2 07 Aug 2020
    Release notes
    • TenantAware now uses the Tenant model from config
    Open source →
  52. 1.6.1 06 Aug 2020
    Release notes
    • TenantsArtisanCommand now uses TenantAware trait
    Open source →
  53. 1.6.0 06 Aug 2020
    Release notes
    • added TenantAware
    Open source →
  54. 1.5.1 30 Jul 2020
    Release notes
    • 🐛 properly handle queued mailables and notification (#78)
    Open source →
  55. 1.5.0 24 Jul 2020
    Release notes
    • database switch fails with misconfigured tenant (#92)
    Open source →
  56. 1.4.0 02 Jul 2020
    Release notes
    • added execute for the landlord
    Open source →
  57. 1.3.0 26 Jun 2020
    Release notes
    • added $tenant->execute($callable) to execute isolated tenant code (#60)
    Open source →
  58. 1.2.0 21 Jun 2020
    Release notes
    • tenant:artisan search field customizable using config (#52)
    Open source →
  59. 1.1.5 21 Jun 2020
    Release notes
    • allow mass assignment when creating a new tenant by default (#57)
    Open source →
  60. 1.1.4 17 Jun 2020
    Release notes
    • improve error handling of tenant aware jobs
    Open source →

Every package, every release, already written down.

The archive is open and free. Watching your own project is what we are building next.

Browse the archive