mirror of
https://github.com/stancl/tenancy-docs.git
synced 2025-12-12 10:14:03 +00:00
Improved Documentation Search (#61)
* chore: (Improve documentation search for V3) * fix: checks for mispelled words * fix: mispelled words * fix spaces and syntax * Update multi-database-tenancy.blade.md Co-authored-by: Samuel Stancl <samuel.stancl@gmail.com>
This commit is contained in:
parent
0549607899
commit
a4645b3abd
42 changed files with 158 additions and 158 deletions
|
|
@ -4,7 +4,7 @@ extends: _layouts.documentation
|
|||
section: content
|
||||
---
|
||||
|
||||
# Tenant config
|
||||
# Tenant config {#tenant-config}
|
||||
|
||||
It's likely you will need to use tenant-specific config in your application. That config could be API keys, things like "products per page" and many other things.
|
||||
|
||||
|
|
@ -13,7 +13,7 @@ You could just use the the tenant model to get these values, but you may still
|
|||
- separation of concerns — if you just write tenancy implementation-agnostic `config('shop.products_per_page')`, you will have a much better time changing tenancy implementations
|
||||
- default values — you may want to use the tenant storage only to override values in your config file
|
||||
|
||||
## **Enabling the feature**
|
||||
## **Enabling the feature** {#enabling-the-feature}
|
||||
|
||||
Uncomment the following line in your `tenancy.features` config:
|
||||
|
||||
|
|
@ -21,7 +21,7 @@ Uncomment the following line in your `tenancy.features` config:
|
|||
// Stancl\Tenancy\Features\TenantConfig::class,
|
||||
```
|
||||
|
||||
## **Configuring the mappings**
|
||||
## **Configuring the mappings** {#configuring-the-mappings}
|
||||
|
||||
This feature maps keys in the tenant storage to config keys based on the `$storageToConfigMap` public property.
|
||||
|
||||
|
|
@ -35,7 +35,7 @@ For example, if your `$storageToConfigMap` looked like this:
|
|||
|
||||
the value of `paypal_api_key` in tenant model would be copied to the `services.paypal.api_key` config when tenancy is initialized.
|
||||
|
||||
## Mapping the value to multiple config keys
|
||||
## Mapping the value to multiple config keys {#mapping-the-value-to-multiple-config-keys}
|
||||
|
||||
Sometimes you may want to copy the value to multiple config keys. To do that, specify the config keys as an array:
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue