Skip to content

Commit

Permalink
Correction ImageTag
Browse files Browse the repository at this point in the history
  • Loading branch information
tomredhot committed May 12, 2020
1 parent 4d5fa0e commit 87188ff
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/HasImageUploads.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,11 @@ public function imageUrl($field = null)
$this->uploadFieldOptions = $this->getUploadFieldOptions($this->uploadFieldName);

// get the model attribute value
$attributeValue = $this->getOriginal($this->uploadFieldName);
if(Arr::get($this->uploadFieldOptions, 'update_database',true)){
$attributeValue = $this->getOriginal($this->uploadFieldName);
}else{
$attributeValue = $this->getFileUploadPath($field);
}

// check for placeholder defined in option
$placeholderImage = Arr::get($this->uploadFieldOptions, 'placeholder');
Expand Down

0 comments on commit 87188ff

Please sign in to comment.