From 33ce71e8f636f7d6e1eecacc1459f391b8bfa2ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Tamarelle?= Date: Sat, 19 Aug 2023 00:06:01 +0200 Subject: [PATCH] cast --- src/Relations/BelongsToMany.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Relations/BelongsToMany.php b/src/Relations/BelongsToMany.php index 46a88cb..5c7e089 100644 --- a/src/Relations/BelongsToMany.php +++ b/src/Relations/BelongsToMany.php @@ -325,7 +325,7 @@ protected function formatSyncList(array $records) if (! is_array($attributes)) { [$id, $attributes] = [$attributes, []]; } - $results[$id] = $attributes; + $results[(string) $id] = $attributes; } return $results;