diff --git a/src/TranslatesFactoryData.php b/src/TranslatesFactoryData.php index ea66754..a641e0e 100644 --- a/src/TranslatesFactoryData.php +++ b/src/TranslatesFactoryData.php @@ -16,7 +16,7 @@ private function transformFactoriesToRelationIds(array $defaultModelFields): arr return collect($defaultModelFields) ->map(function ($item) { if ($this->isFactory($item)) { - return $item->create()->id; + return $item->create()->getKey(); } return $item;