Skip to content

Commit

Permalink
Allow specifying a name for the greeting (#7)
Browse files Browse the repository at this point in the history
  • Loading branch information
rene-bos authored Jan 13, 2022
1 parent 91cf28d commit 3e96680
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/Controller/HelloWorldController.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,15 @@ public function helloWorld(): Response
'<html><body>Hallo meneer.</body></html>'
);
}

#[Route('/hello-world/{name}')]
public function helloWorldWithName(string $name): Response
{
return new Response(
sprintf(
'<html><body>Hello, %s</body></html>',
$name,
)
);
}
}

0 comments on commit 3e96680

Please sign in to comment.