mirror of
https://github.com/archtechx/tenancy.git
synced 2025-12-16 11:04: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:
parent
582243c53f
commit
bd44036a9f
2 changed files with 17 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue