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
Samuel Štancl 7bacc50b27
[4.x] Storage::url() support (modified #689) (#909)
* This adds support for tenancy aware  Storage::url() method

* Trigger CI build

* Fixed Link command for Laravel v6, added StorageLink Events, more StorageLink tests, added RemoveStorageSymlinks Job, added Storage Jobs to TenancyServiceProvider stub, renamed misleading config example.

* Fix typo

* Fix code style (php-cs-fixer)

* Update config comments

* Format code in Link command, make writing more concise

* Change "symLinks" to "symlinks"

* Refactor Link command

* Fix test name typo

* Test fetching files using the public URL

* Extract Link command logic into actions

* Fix code style (php-cs-fixer)

* Check if closure is null in CreateStorageSymlinksAction

* Stop using command terminology in CreateStorageSymlinksAction

* Separate the Storage::url() test cases

* Update url_override comments

* Remove afterLink closures, add types, move actions, add usage explanation to the symlink trait

* Fix code style (php-cs-fixer)

* Update public storage URL test

* Fix issue with using str()

* Improve url_override comment, add todos

* add todo comment

* fix docblock style

* Add link command tests back

* Add types to $tenants in the action handle() methods

* Fix typo, update variable name formatting

* Add tests for the symlink actions

* Change possibleTenantSymlinks not to prefix the paths twice while tenancy is initialized

* Fix code style (php-cs-fixer)

* Stop testing storage directory existence in symlink test

* Don't specify full namespace for Tenant model annotation

* Don't specify full namespace in ActionTest

* Remove "change to DI" todo

* Remove possibleTenantSymlinks return annotation

* Remove symlink-related jobs, instantiate and use actions

* Revert "Remove symlink-related jobs, instantiate and use actions"

This reverts commit 547440c887.

* Add a comment line about the possible tenant symlinks

* Correct storagePath and publicPath variables

* Revert "Correct storagePath and publicPath variables"

This reverts commit e3aa8e2086.

* add a todo

Co-authored-by: Martin Vlcek <martin@dontfreakout.eu>
Co-authored-by: lukinovec <lukinovec@gmail.com>
Co-authored-by: PHP CS Fixer <phpcsfixer@example.com>
2022-09-28 05:09:45 +02:00
.github Move to archtechx/tenancy:latest 2022-08-30 16:23:50 +02:00
art Update artwork 2020-06-09 15:36:47 +02:00
assets [4.x] Storage::url() support (modified #689) (#909) 2022-09-28 05:09:45 +02:00
src [4.x] Storage::url() support (modified #689) (#909) 2022-09-28 05:09:45 +02:00
tests [4.x] Storage::url() support (modified #689) (#909) 2022-09-28 05:09:45 +02:00
.gitattributes Rewrite cached resolver logic to allow for cache invalidation logic 2020-06-02 20:10:17 +02:00
.gitignore Completing PR #881 (#902) 2022-07-20 15:28:45 +02:00
.php-cs-fixer.php Completing PR #881 (#902) 2022-07-20 15:28:45 +02:00
composer.json update spatie/ignition to support L9 (#930) 2022-08-30 15:21:19 +02: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 get phpstan errors down from 252 to 189 2022-08-30 05:44:23 +02:00
phpunit.xml Updated some docker stuff (#409) 2020-05-22 18:09:07 +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