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

By default, only override the config if the override tenant property is set (otherwise, just skip the override and keep the default config value)

This commit is contained in:
lukinovec 2025-07-31 15:15:33 +02:00
parent 582243c53f
commit bd44036a9f
2 changed files with 17 additions and 1 deletions

View file

@ -100,7 +100,9 @@ class LogTenancyBootstrapper implements TenancyBootstrapper
if (is_array($override)) {
// Map tenant properties to channel config keys
foreach ($override as $configKey => $tenantProperty) {
$this->config->set("logging.channels.{$channel}.{$configKey}", $tenant->$tenantProperty);
if ($tenant->$tenantProperty) {
$this->config->set("logging.channels.{$channel}.{$configKey}", $tenant->$tenantProperty);
}
}
} elseif ($override instanceof Closure) {
// Execute custom configuration closure