<div class="table-responsive">
    <table id="example" class="table table-bordered align-middle" style="width:100%">
        <thead class="table-light">
            <tr>
                <th class="thbutton">Serial No</th>
                <th>Products</th>
                <th>Category</th>
                <th>Group</th>
                <th>Brand</th>
                <th style="width: 13%; text-align:center">View</th>
            </tr>
        </thead>
        <tbody>
            @php $i=1;@endphp
            @if(count($data)>0)
                @foreach($data as $key=> $list)
                    <tr>
                        <td>{{$data->firstItem() + $key}}</td>
                        <td><a href="{{route('product-feature-modules', ['id' => $list->id, 'code' => $list->shortcode])}}"><strong>{{ucfirst($list->name)}}</strong></a></td>
                        <td>{{ $list->getProductCategory->name ?? '-'  }}</td> 
                        <td>{{ $list->getProductGroup->name ?? '-'}}</td>
                        <td>{{ $list->getProductBrand->name ?? '-'}}</td>
                        <td style="text-align: center"><a href="{{route('product-feature-modules', ['id' => $list->id, 'code' => $list->shortcode])}}"><strong>Show Feature</strong> </a></td>
                    </tr>
                    @php $i++; @endphp
                @endforeach
            @else
                <tr>
                    <td colspan="5">No Data Found</td>
                </tr>
            @endif
        </tbody>
    </table>
</div>

<nav class="mt-2 row">
    <div class="col-lg-10 col-md-10 col-10 float-start">
        {!! $data->onEachSide(0)->render('product-features.pagination') !!}
    </div>
    <div class="col-lg-2 col-md-2 col-2 dataTables_length" id="example_length" style="text-align: right;">
            <i class="bi bi-funnel" style=" top: 11px;left: 20px;"></i>
            <select class="form-select sorting sorting-box" id="" name="example_length" aria-controls="example" style="padding-left: 30px;">
                <option value="10">Show: 10</option>
                <option value="30">Show: 30</option>
                <option value="50">Show: 50</option>
            </select>
    </div>
</nav>
</div>

