There was an error while loading. Please reload this page.
1 parent 4d5fa0e commit 87188ffCopy full SHA for 87188ff
src/HasImageUploads.php
@@ -85,7 +85,11 @@ public function imageUrl($field = null)
85
$this->uploadFieldOptions = $this->getUploadFieldOptions($this->uploadFieldName);
86
87
// get the model attribute value
88
- $attributeValue = $this->getOriginal($this->uploadFieldName);
+ if(Arr::get($this->uploadFieldOptions, 'update_database',true)){
89
+ $attributeValue = $this->getOriginal($this->uploadFieldName);
90
+ }else{
91
+ $attributeValue = $this->getFileUploadPath($field);
92
+ }
93
94
// check for placeholder defined in option
95
$placeholderImage = Arr::get($this->uploadFieldOptions, 'placeholder');
0 commit comments