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 3558afd + aa355da commit 2a7e74aCopy full SHA for 2a7e74a
src/Translatable/Traits/Relationship.php
@@ -65,7 +65,11 @@ public function translation(): HasOne
65
{
66
return $this
67
->hasOne($this->getTranslationModelName(), $this->getTranslationRelationKey())
68
- ->where($this->getLocaleKey(), $this->localeOrFallback());
+ ->ofMany([
69
+ $this->getTranslationRelationKey() => 'max',
70
+ ], function ($query) {
71
+ $query->where($this->getLocaleKey(), $this->localeOrFallback());
72
+ });
73
}
74
75
protected function localeOrFallback()
0 commit comments