@php
    $pedestrians = collect($data['parti_coinvolte'])->filter(function ($item) {
        return $item->conducente_o_pedone == 1;
    });
@endphp

@if ($pedestrians->count() > 0)
    <table width="100%" class="table-title">
        <tr>
            <td align="center">
                <h2>PEDONI COINVOLTI</h2>
            </td>
        </tr>
    </table>

    <table class="table-content striped-table" width="100%">
        <thead>
            <tr>
                <th align="center">NOME</th>
            </tr>
        </thead>
        <tbody>
            @foreach ($pedestrians as $pedone)
                <tr>
                    <td align="center">
                        {{ optional($pedone->anagrafica_data)->lastname }}
                        {{ optional($pedone->anagrafica_data)->firstname }}
                    </td>
                </tr>
            @endforeach
        </tbody>
    </table>
@endif
