mirror of
https://github.com/archtechx/tenancy.git
synced 2025-12-12 12:54:05 +00:00
Use $data instead of get() in TenantConfig
This commit is contained in:
parent
24ce8f9454
commit
6d00b9b866
2 changed files with 5 additions and 2 deletions
|
|
@ -82,9 +82,9 @@ return [
|
|||
// not needed for tenancy to be bootstrapped. They are run
|
||||
// regardless of whether tenancy has been initialized.
|
||||
|
||||
// Stancl\Tenancy\Features\TenantConfig::class,
|
||||
// Stancl\Tenancy\Features\TelescopeTags::class,
|
||||
// Stancl\Tenancy\Features\TenantRedirect::class,
|
||||
// Stancl\Tenancy\Features\TenantConfig::class,
|
||||
],
|
||||
'storage_to_config_map' => [ // Used by the TenantConfig feature
|
||||
// 'paypal_api_key' => 'services.paypal.api_key',
|
||||
|
|
|
|||
|
|
@ -40,7 +40,10 @@ class TenantConfig implements Feature
|
|||
public function setTenantConfig(Tenant $tenant): void
|
||||
{
|
||||
foreach ($this->getStorageToConfigMap() as $storageKey => $configKey) {
|
||||
$this->config[$configKey] = $tenant->get($storageKey);
|
||||
$override = $tenant->data[$storageKey] ?? null;
|
||||
if (! is_null($override)) {
|
||||
$this->config[$configKey] = $override;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue