<div class="card">
    <div class="card-header">
        <h5>Sub County Listing</h5>
    </div>
    <div class="card-block table-border-style">
        <div class="table-responsive">
            <table class="table table-hover" id="table">
                <thead>
                    <tr>
                        <th>#</th>
                        <th>Code</th>
                        <th>Name</th>
                        <th>District</th>
                        <th>Sub Region</th>
                        <th>Region</th>
                        <th><i>i</i></th>
                    </tr>
                </thead>
                <tbody>
                    <?php $key = 1; ?>
                    @foreach($locationData as $subcounty)
                    <tr>
                        <th scope="row"><?php echo $key; ?></th>
                        <td>{{$subcounty->code}}</td>
                        <td>{{$subcounty->name}}</td>
                        <td>{{$subcounty->district}}</td>
                        <td>{{$subcounty->subregion}}</td>
                        <td>{{$subcounty->region}}</td>
                        <td><a href="{{ url('/location/sub-county?id=' . ($subcounty->uuid ?? $subcounty->id)) }}" class="ti-pencil"></a> &nbsp;<a href="#" class="ti-close label label-danger"></a> </td>
                    </tr>
                    <?php $key++;?>
                    @endforeach
                </tbody>
            </table>
        </div>
    </div>
</div>
