 <div class="table-responsive">
    <table id="example" class="table table-bordered align-middle" style="width:100%">
        <thead class="table-light">
            <tr>
                <th class="thbutton">Sl No</th>
                <th>License No</th>
                <th>Customer Details</th>
                <th>Service Details</th>
            </tr>
        </thead>
        <tbody>
            @php $i=1;@endphp
            @if(count($data)>0)
                @foreach($data as $key=> $list)
                    <tr>
                        <td class="text-center">{{$key + 1}}</td>
                        <td><a href="{!! route('license-registered-details', $list->id) !!}"><strong>{!! $list->license_no !!}</strong></a><br>{!! formatedDate($list->license_date) !!}</td>
                        <td>
                            <strong>{!! @$list->name !!}</strong><br />
                            @if ($list->email != '')
                            <a href="mailto:{!! @$list->email !!}"><i class="bi bi-envelope"></i> {!! @$list->email !!}</a><br />
                            @endif
                            @if ($list->phone_no != '')
                            <a href="tel:{!! @$list->phone_no !!}"><i class="bi bi-telephone-fill"></i> {!! @$list->phone_no !!}</a><br />
                            @endif
                            @if ($list->whatsapp_no != '')
                            <a href="https://wa.me/{!! @$list->whatsapp_no !!}"><i class="bi bi-whatsapp"></i> {!! @$list->whatsapp_no !!}</a><br />
                            @endif
                        </td>
                        <!-- <td>{!! ($list->last_renewal_date != '0000-00-00') ? formatedDate($list->last_renewal_date) : 'N/A' !!}</td> -->
                        <?php
                            if (isset($list->expiry_date)) {
                            $expiryDate = \Carbon\Carbon::parse($list->expiry_date);
                            $currentDate = \Carbon\Carbon::now();
                            $remainingDays = $currentDate->diffInDays($expiryDate);
                            }
                        ?>
                        <!-- <td>
                            {!! formatedDate(@$list->expiry_date) !!}
                            @if (isset($list->expiry_date))
                            ({!! $remainingDays !!} Days)
                            @endif
                        </td> -->
                        <td>{!! @$list->services !!}</td>
                    </tr>
                    @php $i++; @endphp
                @endforeach
            @else
            <tr>
                <td colspan="13">No Data Found</td>
            </tr>
            @endif
        </tbody>
    </table>
</div>
<nav class="row align-items-center mt-3">
    <div class="col-md-6">
    </div>
    <div class="col-md-6" style="text-align: right;">
        <div class="btn-group mb-0">
            <a class="btn btn-outline-primary" href="{!! route('renewal.report.export', ['type' => request()->route('type')]) !!}" target="_blank"><i class="bx bx-download"></i> Export</a>
        </div>
    </div>
</nav>
</div>

