I have a website in symfony2. Now I am create a controller and action like this
class FriendController extends Controller {
public function indexAction()
{
return $this->render('xxxxBundle:Default:index.html.twig');
}
}
after that create route in routing.yml file
name:
pattern: /index
defaults: { _controller: xxxxBundle:Friend:index }
My need is automatically create routes while creating controller and action without specifying in routing.yml . Is this possible in Symfony2?