1
0
Fork 0
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
Find a file
Samuel Štancl 48b916e182
Supported named in-memory SQLite databases (#69)
This PR adds support for named in-memory SQLite databases, making it feasible to use in-memory SQLite for tenant databases in tests.

The usage is simply creating a tenant with 'tenancy_db_name' => ':memory:' and the bootstrapper will automatically update the tenant with a database name derived from its tenant key.

There are static property hooks for keeping these DBs alive (at least one connection needs to be open, they don't have process lifetime and are essentially "refcounted") and closing them when the database is deleted. This gives the user control over the lifetimes of these databases.
2024-11-25 04:48:52 +01:00
.github Update specific attributes of pending tenants while they're being pulled (#59) 2024-08-28 00:41:16 +02:00
art Update artwork 2020-06-09 15:36:47 +02:00
assets Make RootUrlBootstrapper only have an effect in CLI (#58) 2024-08-28 00:42:36 +02:00
doctum wip 2023-04-14 17:23:19 +02:00
src Supported named in-memory SQLite databases (#69) 2024-11-25 04:48:52 +01:00
tests Fix origin id w/ empty header & using full-hostname subdomain records 2024-11-09 20:48:45 +01: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 Update specific attributes of pending tenants while they're being pulled (#59) 2024-08-28 00:41:16 +02:00
composer.json Fix origin id w/ empty header & using full-hostname subdomain records 2024-11-09 20:48:45 +01:00
CONTRIBUTING.md Cache prefixing logic rewrite, session scoping improvements, tests refactor (#43) 2024-04-09 20:40:27 +02:00
docker-compose-m1.override.yml Laravel 11 support + Docker improvements (#29) 2024-02-18 00:18:31 +01:00
docker-compose.yml docker: base Dockerfile on php images, misc improvements 2024-10-11 21:29:54 +02:00
Dockerfile docker: add composer back 2024-10-11 21:54:10 +02:00
DONATIONS.md update md files 2020-06-08 22:42:13 +02:00
INTERNAL.md Postgres RLS + permission controlled database managers (#33) 2024-04-24 22:32:49 +02:00
LICENSE Initial commit 2019-01-17 22:24:12 +01:00
phpstan.neon phpstan fixes 2024-09-27 23:16:39 +02:00
phpunit.xml Misc test fixes (#44) 2024-04-06 19:17:34 +02:00
README.md update laravel version 2023-04-24 22:02:32 +02:00
SUPPORT.md Discord link 2022-06-13 19:16:35 +02:00
t docker: base Dockerfile on php images, misc improvements 2024-10-11 21:29:54 +02:00
test docker: base Dockerfile on php images, misc improvements 2024-10-11 21:29:54 +02:00

Tenancy for Laravel logo

Laravel 10.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://tenancyforlaravel.com/docs/v3/

The repository with the documentation source code can be found here: stancl/tenancy-docs.

Need help?

Credits