mirror of
https://github.com/archtechx/tenancy.git
synced 2025-12-12 08:04:03 +00:00
Automatic multi-tenancy for Laravel. No code changes needed.
https://tenancyforlaravel.com
With the previous implementation, many users would use the default config that enables scope_sessions. They would then deploy the app to production and get the exception there since they use the `database` session driver which is scoped by a different mechanism. The idea behind throwing the exception only in prod was to make it easy to use different setups locally without getting annoying exceptions, while notifying users that a security feature they enabled isn't running in production. However, a better way of doing this is to just throw the exception consistently in all setups and use a sane default for enabling the scope_sessions setting based on the SESSION_DRIVER env var. Users are always encouraged to read the session scoping docs to make sure their session scoping configuration makes sense for their specific setup, but this is a good balance for providing solid security out of the box for most setups without requiring users to configure things manually. |
||
|---|---|---|
| .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 | ||
| static_properties.nu | ||
| 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://v4.tenancyforlaravel.com
Need help?
Credits
- Package created by Samuel Štancl
- Design help & current logo by Florian Karsten
