<?php
use App\Services\Chapter2Service;
use Livewire\Component;
?>

<div>
    <div class="card-block table-border-style">
        <div class="table-responsive">
            <table class="table table-bordered" style="width: 100%">
                <thead>
                    <tr>
                        @foreach ($data as $item)
                            <th class="text-center">{{ $item->code }}</th>
                        @endforeach
                        <th class="text-center">Total</th>
                    </tr>
                </thead>
                <tbody>
                    <tr>
                        @foreach ($data as $item)
                            <td class="text-center">{{ $this->compte($item->id) }}</td>
                        @endforeach
                        <th class="text-center">{{ $total < 10 ? '0'.$total:$total }}</th>
                    </tr>
                </tbody>
            </table>
        </div>
    </div>
</div>