Skip to content

Commit

Permalink
Update 17.automated-routes.md
Browse files Browse the repository at this point in the history
  • Loading branch information
razshare authored Aug 25, 2023
1 parent 7bbdfaf commit e5aef66
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/17.automated-routes.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,10 @@ Let's see another example:
File name is `/about/{username}/get.php`

```php
return fn(#[Param] string $username)=>"this is $username's about page.";
return fn(string $username)=>"this is $username's about page.";
```

As you can see, this example is injecting a path parameter, that is because the infered path in this case is `/about/{username}`, which makes the parameter `#[Param] string $username` a valid injection.
As you can see, this example is injecting a path parameter, that is because the infered path in this case is `/about/{username}`, which contains the path parameter `username`.

> **Note** You can read more about path parameters [here](https://github.com/tncrazvan/catpaw-core/blob/master/docs/2.path-parameters.md).
Expand Down

0 comments on commit e5aef66

Please sign in to comment.