From 07b4b1531cb96fba8d0c858774ab841e1e04336a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?D=2E=20Nagy=20Gerg=C5=91?= Date: Fri, 2 Feb 2024 09:17:29 +0100 Subject: [PATCH] update --- src/Fields/File.php | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/Fields/File.php b/src/Fields/File.php index d0f8d3b6..fd3ba1cc 100644 --- a/src/Fields/File.php +++ b/src/Fields/File.php @@ -198,10 +198,7 @@ public function persist(Request $request, Model $model, mixed $value): void return $this->store($request, $model, $file)['value']; }, $files); - $value = array_replace( - (array) $value, - $this->mergePivotValues($ids) - ); + $value += $this->mergePivotValues($ids); $this->resolveHydrate($request, $model, $value);