Advertisement
sanjiisan

Untitled

Sep 11th, 2017
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.71 KB | None | 0 0
  1. <?php
  2.  
  3. namespace AppBundle\Controller;
  4.  
  5. use Sensio\Bundle\FrameworkExtraBundle\Configuration\Method;
  6. use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
  7. use Symfony\Bundle\FrameworkBundle\Controller\Controller;
  8. use Symfony\Component\HttpFoundation\Response;
  9.  
  10. class IndexController extends Controller
  11. {
  12. /**
  13. * @Route("/goodbye/{username}")
  14. */
  15. public function goodbyeAction($username)
  16. {
  17. return new Response("Goodbye $username");
  18. }
  19.  
  20. /**
  21. * @Route("/welcome/{name}/{surname}", defaults={"name"="Paweł", "surname"="Wójcik"})
  22. */
  23. public function welcomeAction($name, $surname)
  24. {
  25. return new Response("Welcome $name $surname");
  26. }
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement