Helo guys, im a Symfony noob so please bear with me
i have a simple controller like so
<?php
namespace Sites\AllBundle\Controller;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Component\HttpFoundation\RedirectResponse;
use Symfony\Component\HttpFoundation\Request;
// these import the "@Route" and "@Template" annotations
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template;
class SitesController extends Controller
{
/**
* @Route("/", name="_all")
* @Template()
*/
public function indexAction()
{
return array('name' => 'sssssss');
}
/**
* @Route("/wow",)
* @Template()
*/
public function wowAction()
{
return array('wow' => 'sssssss');
}
}
And my routing.yml for this bundle is like this
_all:
resource: "@SitesAllBundle/Controller/SitesController.php"
type: annotation
prefix: /sites
And the routing in app/config/routing.yml is like so
sites_all:
resource: "@SitesAllBundle/Resources/config/routing.yml"
Simple enough and it works fine......but i dont want add this
@Route("/")
in the comment for every function, and if i remove it, it dosent work.
Is there a way to make the controller/function directly point to that function ?
Thanks guys