<!DOCTYPE html>
<html lang="it">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Articoli Venduti</title>
    <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css">
</head>

<body>
    <div class="container">
        <h1>Tutti gli Ordini</h1>
        <table class="table table-striped">
            <thead>
                <tr>
                    <th>Num</th>
                    <th>Data Ora</th>
                    <th>Quantità</th>
                    <th>Titolo Articolo</th>
                    <th>Ean13</th>
                </tr>
            </thead>
            <tbody>
            <!--<pre>{{ print_r($ordini, true) }}</pre>-->

                @foreach($ordini as $ordine)
                    <tr>
                        <td>@if (isset($ordine->progressivo)){{  $ordine->progressivo }}@endif
                        </td>
                        <td>@if (isset($ordine->DataOra))
                            {{ \Carbon\Carbon::parse($ordine->DataOra)->format('d/m/Y H:i:s') }}
                        @endif
                        </td>
                        <td>@if (isset($ordine->Qta)){{  $ordine->Qta }}@endif
                        </td>
                        <td>@if (isset($ordine->Titolo)){{  $ordine->Titolo }}@endif
                        </td>
                        <td>@if (isset($ordine->Ean13)){{  $ordine->Ean13 }}@endif
                        </td>
                    </tr>
                @endforeach
            </tbody>
        </table>
    </div>
</body>

</html>