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
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. |
||
|---|---|---|
| .github | ||
| art | ||
| assets | ||
| doctum | ||
| extensions | ||
| src | ||
| tests | ||
| typedefs | ||
| .gitattributes | ||
| .gitignore | ||
| .nvim.lua | ||
| .php-cs-fixer.php | ||
| CLAUDE.md | ||
| composer.json | ||
| CONTRIBUTING.md | ||
| docker-compose-m1.override.yml | ||
| docker-compose.yml | ||
| Dockerfile | ||
| DONATIONS.md | ||
| INTERNAL.md | ||
| LICENSE | ||
| phpstan.neon | ||
| phpunit.xml | ||
| README.md | ||
| SUPPORT.md | ||
| t | ||
| test | ||
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
- Package created by Samuel Štancl
- Design help & current logo by Florian Karsten
