我在AppKernel中有简单的MapBoundle寄存器:
public function registerBundles()
{
$bundles = [
// ...
new Kajzar\MapBundle\KajzarMapBundle(),
在/app/config/routing.yml中:
kajzar_map:
resource: "@KajzarMapBundle/Controller/"
type: annotation
在/Kajzar/MapBundle/Controller/DefaultController.php我有
/**
* @Route("/", name="homepage")
*/
public function indexAction(Request $request) {
return $this->render('KajzarMapBundle:Default:index.html.twig', [
'request' => $request,
]
);
}
并且它在dev(http://localhost/app_dev.php)中工作,当我尝试键入http://app.php时,我有500个错误。怎么了?
我已通过
清除了缓存 php bin/console cache:clear --env=prod