Skip to content
This repository has been archived by the owner on Jun 18, 2019. It is now read-only.

Solving the issue of empty attribute values #410

Merged
merged 1 commit into from
Jan 4, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/Translatable/Translatable.php
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ public function getAttribute($key)

if ($this->isTranslationAttribute($attribute)) {
if ($this->getTranslation($locale) === null) {
return null;
return $this->getAttributeValue($attribute);
}

// If the given $attribute has a mutator, we push it to $attributes and then call getAttributeValue
Expand Down