diff --git a/src/Field.php b/src/Field.php index 6bdca384..f79ff6c8 100644 --- a/src/Field.php +++ b/src/Field.php @@ -50,7 +50,7 @@ public function getFields(bool $cache = true): array throw new Exception('Fields must be an array or an instance of Builder.'); } - $fields = ! empty($fields['fields']) ? [$fields] : $fields; + $fields = ! empty($fields['key']) ? [$fields] : $fields; foreach ($fields as $key => $field) { $fields[$key] = is_a($field, FieldsBuilder::class)