I'm studying Symfony2 making test program. I met some errors about symfony routing error. The error is:
Class AppBundle\Controller\DefaultController does not exist in C:\projects\classic-symfony\src\AppBundle/Controller/
(which is being imported from "C:\projects\classic-symfony\app/configouting.yml"
).
Certainly I deleted , so 2 lines are written, DefaultController.php
in C:\projects\classic-symfony\src\AppBundle/Controller/
, and deployed ToppageController.php
instead of it.
ToppageController.php
is very simple and the following,
<?php
namespace AppBundle\Controller;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
class ToppageController extends Controller
{
/**
* @Route("/")
*/
public function indexAction()
{
return $this->rendor('Toppage/index.html.twig');
}
}
Why does this code not work ? This is routing problem ?
4.23.2016 Thank you everyone. I'm out of office so will try and response next week.
4.25.2016 I replied new problem to this reply. Could you help this problem ?