<div class="card">
    <div class="card-header">
        <h5>District 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>Region</th>
                        <th>Sub Region</th>
                        <th><i>i</i></th>
                    </tr>
                </thead>
                <tbody>
                    <?php $key = 1; ?>
                    @foreach($locationData as $district)
                    <tr>
                        <th scope="row"><?php echo $key; ?></th>
                        <td>{{$district->code}}</td>
                        <td>{{$district->name}}</td>
                        <td>{{$district->region}}</td>
                        <td>{{$district->subregion}}</td>
                        <td><a href="{{ url('/location/districts/' . ($district->uuid ?? $district->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>
