mirror of
https://github.com/stancl/tenancy-docs.git
synced 2025-12-12 10:14:03 +00:00
h2 -> h3
This commit is contained in:
parent
5d88710d83
commit
33943b6a0e
1 changed files with 6 additions and 6 deletions
|
|
@ -21,28 +21,28 @@ However, since you don't want routes related to the app on your main domain and
|
||||||
|
|
||||||
To use central things (databases/caches/Redis connections/filesystems/...) on special places of your tenant app, you may do the following.
|
To use central things (databases/caches/Redis connections/filesystems/...) on special places of your tenant app, you may do the following.
|
||||||
|
|
||||||
## Central database {#central-database}
|
### Central database {#central-database}
|
||||||
|
|
||||||
Create a new connection and use it like `DB::connection($connectionName)->table('foo')->where(...)`
|
Create a new connection and use it like `DB::connection($connectionName)->table('foo')->where(...)`
|
||||||
|
|
||||||
If you want to use models, create a `getConnectionName()` method that returns the name of the central connection
|
If you want to use models, create a `getConnectionName()` method that returns the name of the central connection
|
||||||
|
|
||||||
## Central redis {#central-redis}
|
### Central redis {#central-redis}
|
||||||
|
|
||||||
Create a new connection, *don't* put it into `tenancy.redis.prefixed_connections`, and use it like `Redis::connection('foo')->get('bar')`
|
Create a new connection, *don't* put it into `tenancy.redis.prefixed_connections`, and use it like `Redis::connection('foo')->get('bar')`
|
||||||
|
|
||||||
## Central cache {#central-cache}
|
### Central cache {#central-cache}
|
||||||
|
|
||||||
Use the `GlobalCache` facade, or the `global_cache()` helper.
|
Use the `GlobalCache` facade, or the `global_cache()` helper.
|
||||||
|
|
||||||
## Central storage {#central-storage}
|
### Central storage {#central-storage}
|
||||||
|
|
||||||
Create a disk and *don't* add it to `tenancy.filesystem.disks`.
|
Create a disk and *don't* add it to `tenancy.filesystem.disks`.
|
||||||
|
|
||||||
## Central assets {#central-assets}
|
### Central assets {#central-assets}
|
||||||
|
|
||||||
Use the `global_asset()` helper.
|
Use the `global_asset()` helper.
|
||||||
|
|
||||||
## Central queues {#central-queues}
|
### Central queues {#central-queues}
|
||||||
|
|
||||||
Coming soon.
|
Coming soon.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue