From 4ff869ca9e4f8cbe50f08b9b73e0108e67e3d980 Mon Sep 17 00:00:00 2001 From: Jason Xie Date: Fri, 11 Dec 2020 08:41:45 +0800 Subject: [PATCH] fix wrong placement of } causing failure to create new entries --- src/NestedForm.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/NestedForm.php b/src/NestedForm.php index edfcd33..961a7fc 100644 --- a/src/NestedForm.php +++ b/src/NestedForm.php @@ -344,7 +344,7 @@ protected function fillAttributeFromRequest(NovaRequest $request, $requestAttrib { if ($model->exists) { $newRequest = NovaRequest::createFrom($request); - if (!$model->{$model->getKeyName() && $request->has($model->getKeyName())}) { + if (!$model->{$model->getKeyName()} && $request->has($model->getKeyName())) { $model->{$model->getKeyName()} = $request->get($model->getKeyName()); } $children = collect($newRequest->get($requestAttribute));