index.blade.php 918 B

123456789101112131415161718192021222324252627282930313233
  1. @php
  2. $pedestrians = collect($data['parti_coinvolte'])->filter(function ($item) {
  3. return $item->conducente_o_pedone == 1;
  4. });
  5. @endphp
  6. @if ($pedestrians->count() > 0)
  7. <table width="100%" class="table-title">
  8. <tr>
  9. <td align="center">
  10. <h2>PEDONI COINVOLTI</h2>
  11. </td>
  12. </tr>
  13. </table>
  14. <table class="table-content striped-table" width="100%">
  15. <thead>
  16. <tr>
  17. <th align="center">NOME</th>
  18. </tr>
  19. </thead>
  20. <tbody>
  21. @foreach ($pedestrians as $pedone)
  22. <tr>
  23. <td align="center">
  24. {{ optional($pedone->anagrafica_data)->lastname }}
  25. {{ optional($pedone->anagrafica_data)->firstname }}
  26. </td>
  27. </tr>
  28. @endforeach
  29. </tbody>
  30. </table>
  31. @endif