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.
1 parent e964450 commit 6e368ebCopy full SHA for 6e368eb
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