We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2fb60e2 commit ba2d417Copy full SHA for ba2d417
test/src/Controller/SampleController.php
@@ -76,10 +76,10 @@ public function categoryIndexAction(Request $request): Response
76
return $this->respond($request, $categories);
77
}
78
79
- public function showAction(Request $request): Response
+ public function showAction(Request $request, int $id): Response
80
{
81
$productRepository = $this->objectManager->getRepository(Product::class);
82
- $product = $productRepository->find($request->get('id'));
+ $product = $productRepository->find($id);
83
84
if (!$product) {
85
throw new NotFoundHttpException();
0 commit comments