1
0
Fork 0
mirror of https://github.com/archtechx/tenancy.git synced 2025-12-12 12:44:02 +00:00
Automatic multi-tenancy for Laravel. No code changes needed. https://tenancyforlaravel.com
Find a file
lukinovec e4df597d81
Make providing identification middleware statically to controllers work (#18)
* Test identification with universal flag with statically provided MW

* Include statically provided controller MW in `tenancy()->getRouteMiddleware()`

* Fix code style (php-cs-fixer)

* Fix PHPStan error

* Test path ID MW and route cloning with statically provided MW

* Create validate.yml

* set continue-on-error to true

* change continue-on-error to fail-fast

* add job name and use if: always()

* update todo

* Update path identification and Fortify integration-related logic (#13)

* Add commented UrlBinding + FortifyRouteTenancy bootstrappers to the config

* Improve FortifyRoute bootstrapper docblock

* Rename bootstrappers

* Complete renaming

* Pass defaults of the original URL generator to the new one

* Fix URL generator-related test (query string id test WIP)

* Fix code style (php-cs-fixer)

* Make Fortify bootstrapper not depend on the UrlGenerator bootstrapper, update comments

* Fix testing UrlGenerator bootstrapper

* Update TenancyUrlGenerator annotations

* Pass tenant parameter manually in Fortify bootstrapper

* Properly test TenancyUrlGenerator functionality

* Get rid of query string in Fortify bootstrapper

* Fix code style (php-cs-fixer)

* Delete outdated comment

* Improve comment

* Improve before/afterEach

* Encourage passing parameters using TenancyUrlGenerator instead of URL::defaults()

* Delete rest of defaulting logic

* Fix code style (php-cs-fixer)

* Delete test group

* Update ForgetTenantParameter docblock

* Update passTenantParameterToRoutes annotation

* Complete todo in test

* Improve test

* Update comment

* Improve comment

* Add keepQueryParameters bool to Fortify bootstrapper

* Test keepQueryParameters

* minor docblock update

* minor docblock changes

* Delete extra import

* Update src/Overrides/TenancyUrlGenerator.php

Co-authored-by: Samuel Štancl <samuel.stancl@gmail.com>

* Improve comment

* Rename test

* Update bypass parameter-related test comments

* Fix merge

* Rename $keepQueryParameters

* Add docblock

* Add comment

* Refactor Fortify bootstrapper

* Fix code style (php-cs-fixer)

* Fix comment

* Skip Fortify bootstrapper test

* minor code improvements

* Improve fortify bootstrapper test

* Add Fortify bootstrapper annotation, improve code

* Fix code style (php-cs-fixer)

* Add commenet

* Complete resource syncing todo (cleanup not needed)

* Delete incorrect namespace

* Complete route context trait name todo

* Fix code style (php-cs-fixer)

---------

Co-authored-by: PHP CS Fixer <phpcsfixer@example.com>
Co-authored-by: Samuel Štancl <samuel.stancl@gmail.com>

* Include statically provided controller MW in `tenancy()->getRouteMiddleware()`

* Fix code style (php-cs-fixer)

* Improve PHPStan error fix

* Include statically provided controller MW in `tenancy()->getRouteMiddleware()`

* Fix PHPStan error

* Fix code style (php-cs-fixer)

* Include statically provided controller MW in `tenancy()->getRouteMiddleware()`

* Fix code style (php-cs-fixer)

---------

Co-authored-by: PHP CS Fixer <phpcsfixer@example.com>
Co-authored-by: Samuel Štancl <samuel.stancl@gmail.com>
2023-12-01 09:38:43 +01:00
.github add job name and use if: always() 2023-11-21 02:10:35 +01:00
art Update artwork 2020-06-09 15:36:47 +02:00
assets Update path identification and Fortify integration-related logic (#13) 2023-11-26 21:08:41 +01:00
doctum wip 2023-04-14 17:23:19 +02:00
src Make providing identification middleware statically to controllers work (#18) 2023-12-01 09:38:43 +01:00
tests Make providing identification middleware statically to controllers work (#18) 2023-12-01 09:38:43 +01:00
.gitattributes Rewrite cached resolver logic to allow for cache invalidation logic 2020-06-02 20:10:17 +02:00
.gitignore [4.x] Add pending tenants (modified #782) (#869) 2022-10-31 12:14:44 +01:00
.php-cs-fixer.php [4.x] Add command to bring the tenants up and down from maintenance and remove deprecated exception (#761) 2022-09-29 15:59:14 +02:00
composer.json Single-domain tenants (#16) 2023-11-08 11:38:26 +01:00
CONTRIBUTING.md Fix #998, properly replace ALL tenant_id literals 2022-11-10 16:44:52 +01:00
docker-compose-m1.override.yml Better M1 DX 2022-07-22 22:29:56 +02:00
docker-compose.yml Fix #1112 - throw an exception if DATABASE_URL is set (#9) 2023-08-18 20:21:00 +02:00
Dockerfile specify version of odbc libraries 2023-02-16 17:20:55 +01:00
DONATIONS.md update md files 2020-06-08 22:42:13 +02:00
INTERNAL.md revert to 8.1 in CI for now 2023-01-04 03:04:00 +01:00
LICENSE Initial commit 2019-01-17 22:24:12 +01:00
phpstan.neon Add L10 support to 4.x (merge 3.x to master) (#1071) 2023-02-20 23:47:10 +01:00
phpunit.xml Add SessionTenancyBootstrapper (#2) 2022-11-20 02:32:25 +01:00
README.md Update README.md 2022-05-01 12:56:25 +02:00
SUPPORT.md Discord link 2022-06-13 19:16:35 +02:00
t [4.x] Add feature to ignore the resource synchronization based on provided condition. (#993) 2022-11-04 15:04:29 +01:00
test [4.x] Migrate tests to Pest (#884) 2022-07-22 19:26:59 +02:00

Tenancy for Laravel logo

Laravel 9.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