We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents e964450 + 6e368eb commit 4ce199dCopy full SHA for 4ce199d
src/Translatable/Traits/Relationship.php
@@ -65,12 +65,12 @@ public function translation(): HasOne
65
{
66
return $this
67
->hasOne($this->getTranslationModelName(), $this->getTranslationRelationKey())
68
- ->where('locale', $this->localeOrFallback());
+ ->where($this->getLocaleKey(), $this->localeOrFallback());
69
}
70
71
private function localeOrFallback()
72
73
- return $this->useFallback() && ! $this->translations()->where('locale', $this->locale())->exists()
+ return $this->useFallback() && ! $this->translations()->where($this->getLocaleKey(), $this->locale())->exists()
74
? $this->getFallbackLocale()
75
: $this->locale();
76
0 commit comments