1
0
Fork 0
mirror of https://github.com/archtechx/tenancy.git synced 2025-12-12 08:24:04 +00:00
Automatic multi-tenancy for Laravel. No code changes needed. https://tenancyforlaravel.com
Find a file
Samuel Štancl 4578c9ed7d Features refactor
Features are now *always* bootstrapped, even if Tenancy is not resolved
from the container.

Previous implementations include
https://github.com/tenancy-for-laravel/v4/pull/19
https://github.com/archtechx/tenancy/pull/1021

Bug originally reported here
https://github.com/archtechx/tenancy/issues/949

This implementation is much simpler, we do not distinguish between
features that should be "always bootstrapped" and features that should
only be bootstrapped after Tenancy is resolved. All features should work
without issues if they're bootstrapped when TSP::boot() is called. We
also add a Tenancy::bootstrapFeatures() method that can be used to
bootstrap any features dynamically added at runtime that weren't
bootstrapped in TSP::boot(). The function keeps track of which features
were already bootstrapped so it doesn't bootstrap them again.

The only potentialy risky thing in this implementation is that we're now
resolving Tenancy in TSP::boot() (previously Tenancy was not being
resolved) but that shouldn't be causing any issues.
2025-08-31 23:18:44 +02:00
.github Simplify validate workflow (use regex) 2025-08-12 13:12:43 +02:00
art Update artwork 2020-06-09 15:36:47 +02:00
assets resolve minor todos 2025-08-18 15:05:17 +02:00
doctum wip 2023-04-14 17:23:19 +02:00
extensions [4.x] Add DisallowSqliteAttach feature (#1283) 2025-01-04 15:34:37 +01:00
src Features refactor 2025-08-31 23:18:44 +02:00
tests Features refactor 2025-08-31 23:18:44 +02:00
typedefs parallel commands: core # autodetect, bugfixes, improved output 2024-09-27 23:02:03 +02:00
.gitattributes parallel commands: core # autodetect, bugfixes, improved output 2024-09-27 23:02:03 +02:00
.gitignore Laravel 11 support + Docker improvements (#29) 2024-02-18 00:18:31 +01:00
.nvim.lua editor config: prevent tailwindcss LSP from starting in nvim [ci skip] 2024-04-22 21:27:53 +02:00
.php-cs-fixer.php [4.x] Cloning: addTenantParameter(bool), domain(string|null) (#1374) 2025-07-29 17:17:32 +02:00
CLAUDE.md [4.x] URL generation, request data identification improvements (#1357) 2025-06-02 03:43:47 +02:00
composer.json [4.x] Support database cache store tenancy (#1290) (resolve #852) 2025-08-08 00:54:01 +02:00
CONTRIBUTING.md [4.x] Support database cache store tenancy (#1290) (resolve #852) 2025-08-08 00:54:01 +02:00
docker-compose-m1.override.yml use mysql:8 in docker 2025-01-21 15:23:17 +01:00
docker-compose.yml resolve minor todos 2025-08-18 15:05:17 +02:00
Dockerfile [4.x] Support database cache store tenancy (#1290) (resolve #852) 2025-08-08 00:54:01 +02:00
DONATIONS.md update md files 2020-06-08 22:42:13 +02:00
INTERNAL.md [4.x] Add DisallowSqliteAttach feature (#1283) 2025-01-04 15:34:37 +01:00
LICENSE Initial commit 2019-01-17 22:24:12 +01:00
phpstan.neon phpstan fixes for spatie invader 2025-01-21 14:35:00 +01:00
phpunit.xml Misc test fixes (#44) 2024-04-06 19:17:34 +02:00
README.md prepare for public beta 2024-12-26 05:00:58 +01:00
SUPPORT.md Discord link 2022-06-13 19:16:35 +02:00
t [4.x] URL generation, request data identification improvements (#1357) 2025-06-02 03:43:47 +02:00
test [4.x] URL generation, request data identification improvements (#1357) 2025-06-02 03:43:47 +02:00

Tenancy for Laravel logo

Laravel 11.x Latest Stable Version GitHub Actions CI status Donate

Tenancy for Laravel — stancl/tenancy

Automatic multi-tenancy for your Laravel app.

You won't have to change a thing in your application's code.

  • ✔️ No model traits to change database connection
  • ✔️ No replacing of Laravel classes (Cache, Storage, ...) with tenancy-aware classes
  • ✔️ Built-in tenant identification based on hostname (including second level domains)

Documentation

Documentation can be found here: https://tenancy-v4.pages.dev/

Need help?

Credits