This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.
domjag
I added a second pivot table to my model. I am trying to access both pivots in the same loop like so:
{% for mealitem in list.mealitems %}
<h2 class="mcx"> {{mealitem.name}} </h2>
<h4 class="ui sub header">{{mealitem.pivot.choice_type}}</h4> (Pivot relation is called 'MealType' here)
Now I need to loop through my second pivot table
?? {{mealitem.pivot.nutrion.name}} (Pivot relation is called 'Nutrition' and belongs to same model as 'Meal Type')
So how do I access this second relation in TWIG?
1-1 of 1