Khandaker Toihidul Islam
Software Engineer
Backend : PHP | Mysql | Symfony | CakePhp | Wordpress | Drupal
Frontend : Node js | Vue js | React Js | Javascript | HTML | CSS | Bootstrap
Tools , Server : Nginx | Apache | Git | Jenkins | Jira | Asana | Silenium | Spira

Get request parameter from URL in Symfony


/**
 * @Route("/register/{role}", name="app_register", methods={"GET"})
 */
public function register(Request $request, $role): Response
{
 echo $role ;
 }

For example www.example/register/admin

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *