From 7534c1d113e1f764c4dccdd0b87fb6a8b0010a00 Mon Sep 17 00:00:00 2001 From: binaryk Date: Wed, 17 Nov 2021 11:20:05 +0000 Subject: [PATCH] Fix styling --- src/Fields/FieldCollection.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Fields/FieldCollection.php b/src/Fields/FieldCollection.php index 07f4d081..baf964a5 100644 --- a/src/Fields/FieldCollection.php +++ b/src/Fields/FieldCollection.php @@ -157,7 +157,8 @@ public function findFieldByAttribute($attribute, $default = null) public function inRequest(RestifyRequest $request, $row = null): self { return $this - ->filter(fn (Field $field) => + ->filter( + fn (Field $field) => $request->hasAny($field->attribute, $row.'.'.$field->attribute) || $request->hasFile($field->attribute) )