Skip to content

Commit

Permalink
Small syntax errors
Browse files Browse the repository at this point in the history
Two misplaced parentheses
  • Loading branch information
luisrock authored Oct 19, 2020
1 parent aa5666b commit 853c614
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -182,15 +182,15 @@ Placeholders are easier to use than PRCEs, but offer you less control as they in

```php
$router->get('/movies/{movieId}/photos/{photoId}', function($movieId, $photoId) {
echo 'Movie #' . $movieId . ', photo #' . $photoId);
echo 'Movie #' . $movieId . ', photo #' . $photoId;
});
```

Note: the name of the placeholder does not need to match with the name of the parameter that is passed into the route handling function:

```php
$router->get('/movies/{foo}/photos/{bar}', function($movieId, $photoId) {
echo 'Movie #' . $movieId . ', photo #' . $photoId);
echo 'Movie #' . $movieId . ', photo #' . $photoId;
});
```

Expand Down

0 comments on commit 853c614

Please sign in to comment.