Basics

Clearing cache

1
    php bin/console cache:clear  

Routes

The routes are defined in config/routes.yaml. Documentation

Pass data to template

You can pass data to the template in an array format as a second parameter in the render method

1
return $this->render('/scheduledcomments/admin-comments.html.twig', ['types' => $types]);

Twig

for loop

1
2
3
4
5
6
<h1>Members</h1>
<ul>
    {% for user in users %}
        <li>{{ user.username|e }}</li>
    {% endfor %}
</ul>

More details here