diff --git a/assets/config.php b/assets/config.php index bc954c89..9b848b5f 100644 --- a/assets/config.php +++ b/assets/config.php @@ -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', diff --git a/src/Features/TenantConfig.php b/src/Features/TenantConfig.php index 88e85a90..25c8a57d 100644 --- a/src/Features/TenantConfig.php +++ b/src/Features/TenantConfig.php @@ -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; + } } }