1
0
Fork 0
mirror of https://github.com/archtechx/tenancy.git synced 2025-12-12 18:24:04 +00:00

Final filesystem-related changes (#25)

* Change %tenant_id% to %tenant%

* ID -> key

---------

Co-authored-by: Samuel Štancl <samuel.stancl@gmail.com>
This commit is contained in:
lukinovec 2024-02-10 19:13:02 +01:00 committed by GitHub
parent 6784685054
commit 222bbe4c02
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 14 additions and 15 deletions

View file

@ -248,20 +248,19 @@ return [
/*
* Tenant-aware Storage::disk()->url() can be enabled for specific local disks here
* by mapping the disk's name to a name with '%tenant_id%' (this will be used as the public name of the disk).
* by mapping the disk's name to a name with '%tenant%' (this will be used as the public name of the disk).
* Doing that will override the disk's default URL with a URL containing the current tenant's key.
*
* For example, Storage::disk('public')->url('') will return https://your-app.test/storage/ by default.
* After adding 'public' => 'public-%tenant_id%' to 'url_override',
* the returned URL will be https://your-app.test/public-1/ (%tenant_id% gets substitued by the current tenant's ID).
* After adding 'public' => 'public-%tenant%' to 'url_override',
* the returned URL will be https://your-app.test/public-1/ (%tenant% gets substitued by the current tenant's key).
*
* Use `php artisan tenants:link` to create a symbolic link from the tenant's storage to its public directory.
*/
'url_override' => [
// Note that the local disk you add must exist in the tenancy.filesystem.root_override config
// todo@v4 Rename %tenant_id% to %tenant_key%
// todo@v4 Rename url_override to something that describes the config key better
'public' => 'public-%tenant_id%',
'public' => 'public-%tenant%',
],
/**