1
0
Fork 0
mirror of https://github.com/archtechx/tenancy.git synced 2025-12-12 11:14:04 +00:00
Automatic multi-tenancy for Laravel. No code changes needed. https://tenancyforlaravel.com
Find a file
Abrar Ahmad 77c5ae1f32
[4.x] Configure attributes for synced resources when creating models (#915)
* configure attributes for creating resource

* Update ResourceSyncingTest.php

* Update ci.yml

* Update ResourceSyncingTest.php

* Update ci.yml

* cs

* comments

* Update tests/ResourceSyncingTest.php

Co-authored-by: Samuel Štancl <samuel@archte.ch>

* improve comments, move method to `SyncMaster` interface

* Revert "improve comments, move method to `SyncMaster` interface"

This reverts commit 5ddd50deb9.

* Update ResourceSyncingTest.php

* Update ResourceSyncingTest.php

* update comment

* Update ResourceSyncingTest.php

* Update ResourceSyncingTest.php

* wip

* wip

* wip

* add a todo

* assert that creation attributes returns null

* classes at the end

* rename method to `getAttributesForCreation`

* Update ResourceSyncingTest.php

* update comments

* Fix little grammer

* merge default values with sync attributes and tests

* Update ResourceSyncingTest.php

* method rename

* method rename

* Update ResourceSyncingTest.php

* comments

* Update ResourceSyncingTest.php

* allow defining a mix of attribute names and default values

* add test

* code improvements

* Fix code style (php-cs-fixer)

* remove unused import

* fix all phpstan issues in resource syncing code

* Fix code style (php-cs-fixer)

* wip

* improve tests

* Update ResourceSyncingTest.php

* better names

* Update UpdateSyncedResource.php

* code style

* Update UpdateSyncedResource.php

* add comments above new tests

* methods dockblocks and correct names

* Update ResourceSyncingTest.php

* update comments

* remove different schema setup

* delete custom migrations

* self review

* grammar, code style

* refactor helpers for creating tenants

Co-authored-by: Samuel Štancl <samuel@archte.ch>
Co-authored-by: Samuel Štancl <samuel.stancl@gmail.com>
Co-authored-by: PHP CS Fixer <phpcsfixer@example.com>
2022-11-03 17:51:29 +01:00
.github [4.x] Update commands CLI outputs (#968) 2022-10-18 19:11:57 +02:00
art Update artwork 2020-06-09 15:36:47 +02:00
assets update DatabaseSeeder namespace 2022-11-01 17:48:56 +01:00
src [4.x] Configure attributes for synced resources when creating models (#915) 2022-11-03 17:51:29 +01:00
tests [4.x] Configure attributes for synced resources when creating models (#915) 2022-11-03 17:51:29 +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 Merge branch 'master' of github.com:archtechx/tenancy 2022-11-01 12:47:24 +01:00
CONTRIBUTING.md get phpstan errors down from 252 to 189 2022-08-30 05:44:23 +02:00
docker-compose-m1.override.yml Better M1 DX 2022-07-22 22:29:56 +02:00
docker-compose.yml add mssql health checks (#939) 2022-09-08 18:18:59 +02:00
Dockerfile misc improvements - stronger types, exception refactor 2022-08-26 21:35:17 +02:00
DONATIONS.md update md files 2020-06-08 22:42:13 +02:00
LICENSE Initial commit 2019-01-17 22:24:12 +01:00
phpstan.neon [4.x] Drop tenant databases on migrate:fresh (#971) 2022-10-17 15:19:30 +02:00
phpunit.xml fix #854 2022-10-01 17:59:33 +02: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
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