I am new to symfony2 and MVC in general. I am going through the documentation for Symfony and I am in the chapter on Routing.
I am getting confused with the annotation
/**
* @Route("/blog/{slug}", name="blog_show")
*/
public function showAction($slug)
{
// ...
}
I understand that if user visits blog/xxx, the showAction will be called. What I do not understand is why there is name="blog_show" after the comma in the @Route.
Could someone please describe why we use it?