We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d517b34 commit fa1934cCopy full SHA for fa1934c
controller.rst
@@ -555,6 +555,32 @@ if you want to map a nested array of specific DTOs::
555
) {}
556
}
557
558
+Nevertheless, if you want to send the array of payloads directly like this:
559
+
560
+.. code-block:: json
561
562
+ [
563
+ {
564
+ "firstName": "John",
565
+ "lastName": "Smith",
566
+ "age": 28
567
+ },
568
569
+ "firstName": "Jane",
570
+ "lastName": "Doe",
571
+ "age": 30
572
+ }
573
+ ]
574
575
+Map the parameter as an array and configure the type of each element in the attribute::
576
577
+ public function dashboard(
578
+ #[MapRequestPayload(type: UserDTO::class)] array $users
579
+ ): Response
580
581
+ // ...
582
583
584
Managing the Session
585
--------------------
586
0 commit comments