diff --git a/src/Support/DataType.php b/src/Support/DataType.php index 45d268b64..1c94d25ed 100644 --- a/src/Support/DataType.php +++ b/src/Support/DataType.php @@ -244,7 +244,9 @@ protected function resolveDataCollectableClass( $attributes = $reflection->getAttributes(DataCollectionOf::class); if (! empty($attributes)) { - return $attributes[0]->getArguments()[0]; + $attributeArgumentKey = array_key_first($attributes[0]->getArguments()); + + return $attributes[0]->getArguments()[$attributeArgumentKey]; } if ($reflection instanceof ReflectionParameter) {