I have a question, how can I add the values of the foreach? In this case I want to add the sales, to be able to show the total sales that the assignments have.
One assignment can have many sales.
<tbody>
<?php $numero = 0; ?>
@foreach ($asignaciones as $asignacion)
<tr>
<td>{{ $numero = $numero +1 }}</td>
<td>{{ $asignacion->fecha }}</td>
<td>{{ $asignacion->user->nombre }}</td>
<td>{{ count($asignacion->ventas) }}</td>
</tr>
@endforeach
</tbody>
<thead>
<tr>
<th width="20px">Total</th>
<th></th>
<th></th>
<th>?</th>
</tr>
</thead>