<?php
 use App\Models\Incident; $incidents = array();
 $incidents = Incident::all();
 $key = 1;
?>
<div class="card">
    <div class="card-header">
        <h5>Incident Categories</h5>
    </div>
    <div class="card-block table-border-style">
        <div class="table-responsive">
            <table class="table table-hover">
                <thead>
                    <tr>
                        <th>#</th>
                        <th>Name</th>
                        <th>Code</th>
                        <th>Details</th>
                        <th><i>i</i></th>
                    </tr>
                </thead>
                <tbody>
                    @foreach($incidents as $incident)
                    <tr>
                        <th scope="row"><?php echo $key; ?></th>
                        <td>{{$incident->name}}</td>
                        <td>{{$incident->code}}</td>
                        <td>{{$incident->notes}}</td>
                        <td><a href="<?php echo url('/indicator/incidents?id=')?>{{$incident->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>