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 9b5c370 commit a52698eCopy full SHA for a52698e
src/Translatable/Translatable.php
@@ -181,8 +181,7 @@ public function getNewTranslation(string $locale): Model
181
/** @var Model $translation */
182
$translation = new $modelName();
183
$translation->setAttribute($this->getLocaleKey(), $locale);
184
- $relation = $this->translations();
185
- $translation->setAttribute($relation->getForeignKeyName(), $relation->getParentKey());
+ $translation->setAttribute($this->getTranslationRelationKey(), $this->getKey());
186
$this->translations->add($translation);
187
188
return $translation;
0 commit comments