Symfony default white page controller

After installing new symfony version through composer

php composer create-project symfony/framework-standard-edition myProject

The default welcome page looks like this: enter image description here

All permissions are correct, so not sure where the default view is? Has anyone seen this before?

+5
source share
1 answer

This is exactly what should be displayed. When you install the standard version of the frame, it comes with a default AppBundle with a controller that loads the default index page. The content of this template simply displays the Homepage .

Here's a call to AppBundle/Controller/DefaultController , it displays the template default/index.html.twig :

 return $this->render('default/index.html.twig'); 

And here is the content section of this template:

 {% block body %} Homepage. {% endblock %} 

The fact that the Symfony profiler shows below is the main indicator that you actually installed Symfony correctly.

Here are the files in Symfony 2.7:

https://github.com/symfony/symfony-standard/blob/2.7/src/AppBundle/Controller/DefaultController.php https://github.com/symfony/symfony-standard/blob/2.7/app/Resources/views /default/index.html.twig

The screenshot you are looking for exists for Acme/DemoBundle , which was by default through Symfony 2.4, but it was removed in Symfony 2.5 in favor of much more bare AppBundle bones.

+6
source

Source: https://habr.com/ru/post/1210308/


All Articles