How to display information of different table in twig symfony?

I need to display a table, for example 4 columns, I have a Palmares entity with different information.

How to put data from another sql table in the same loop, other information is linked with palmares.categorie.code Here is a part of my template with html.twig

{% for palmares in palmares %}
<tr>
 <td>{{palmares.categorie.code}}</td>
 <td>other information from another table</td>
 <td>{{palmares.compet.date |date("m/d/Y")}}</td>
 <td>{{palmares.compet.lieu}}</td>
</tr>
{% endfor %}

Source: Symfony Questions

Was this helpful?

0 / 0

Leave a Reply 0

Your email address will not be published. Required fields are marked *