File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -464,6 +464,23 @@ to your resolver and pass your custom name as its first argument::
464
464
// ...
465
465
}
466
466
467
+ You can then pass this name as ``ValueResolver ``'s first argument to pin your resolver::
468
+
469
+ // src/Controller/BookingController.php
470
+ namespace App\Controller;
471
+
472
+ use App\Reservation\BookingId;
473
+ use Symfony\Component\HttpFoundation\Response;
474
+ use Symfony\Component\HttpKernel\Attribute\ValueResolver;
475
+
476
+ class BookingController
477
+ {
478
+ public function index(#[ValueResolver('booking_id')] BookingId $id): Response
479
+ {
480
+ // ... do something with $id
481
+ }
482
+ }
483
+
467
484
.. versionadded :: 6.3
468
485
469
486
The ``controller.targeted_value_resolver `` tag and ``AsTargetedValueResolver ``
You can’t perform that action at this time.
0 commit comments