Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- namespace AppBundle\Controller;
- use Sensio\Bundle\FrameworkExtraBundle\Configuration\Method;
- use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
- use Symfony\Bundle\FrameworkBundle\Controller\Controller;
- use Symfony\Component\HttpFoundation\Response;
- class IndexController extends Controller
- {
- /**
- * @Route("/goodbye/{username}")
- */
- public function goodbyeAction($username)
- {
- return new Response("Goodbye $username");
- }
- /**
- * @Route("/welcome/{name}/{surname}", defaults={"name"="Paweł", "surname"="Wójcik"})
- */
- public function welcomeAction($name, $surname)
- {
- return new Response("Welcome $name $surname");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement