1.

How to create Controllers in Symfony2?

Answer»

CONTROLLER's file DEFAULT location is src/AppBundle/Controller Now you can CREATE here your controller with below code.

Example

NAMESPACE AppBundle\Controller;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;

class YourControllerName EXTENDS Controller
{
}

 



Discussion

No Comment Found