fixed create document company logo issue

This commit is contained in:
Cihan Şentürk 2023-10-18 15:26:51 +03:00 committed by GitHub
parent 3c582c7ffd
commit ab5a55f63e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View File

@ -61,6 +61,8 @@ class SettingFieldCreated
// Upload attachment
$media = $this->getMedia($value, 'settings');
$real_key = $this->getDocumentSettingKey($type, $key);
$company->attachMedia($media, Str::snake($real_key));
$value = $media->id;
@ -71,8 +73,6 @@ class SettingFieldCreated
continue;
}
$real_key = setting($this->getDocumentSettingKey($type, $key));
setting()->set($real_key, $value);
}
}

View File

@ -61,6 +61,8 @@ class SettingFieldUpdated
// Upload attachment
$media = $this->getMedia($value, 'settings');
$real_key = $type . '.' . $key;
$company->attachMedia($media, Str::snake($real_key));
$value = $media->id;
@ -71,8 +73,6 @@ class SettingFieldUpdated
continue;
}
$real_key = $type . '.' . $key;
setting()->set($real_key, $value);
}
}