Skip to content

Commit 2ec0f68

Browse files
authored
Fix UseInputType example as an attribute (#608)
1 parent 55c3fd7 commit 2ec0f68

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

website/versioned_docs/version-6.1/input-types.mdx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -249,9 +249,7 @@ Let's say you want to force a parameter to be of type "ID", you can use this:
249249

250250
```php
251251
#[Factory]
252-
#[UseInputType(for: "$id", inputType:"ID!")]
253-
public function getProductById(string $id): Product
254-
{
252+
public function getProductById(#[UseInputType(inputType:"ID!")] string $id): Product {
255253
return $this->productRepository->findById($id);
256254
}
257255
```

0 commit comments

Comments
 (0)