Get dynamic setting key for apps

This commit is contained in:
Burak Çakırel
2021-12-01 12:11:09 +00:00
parent 4c8a14f10a
commit 60b385b98b
3 changed files with 22 additions and 14 deletions

View File

@@ -42,7 +42,7 @@ class SettingFieldCreated
continue;
}
$real_key = $type . '.' . $key;
$real_key = $this->getSettingKey($type, $key);
setting()->set($real_key, $value);
}
@@ -53,7 +53,7 @@ class SettingFieldCreated
$company = Company::find($document->company_id);
foreach ($files as $key => $value) {
// Upload attachment
// Upload attachment
$media = $this->getMedia($value, 'settings');
$company->attachMedia($media, Str::snake($real_key));
@@ -66,7 +66,7 @@ class SettingFieldCreated
continue;
}
$real_key = $type . '.' . $key;
$real_key = setting($this->getSettingKey($type, $key));
setting()->set($real_key, $value);
}