<?php
 use App\Models\TimeofDay; $times = array();
 $times = TimeofDay::all();
 $key = 1;
?>
<div class="card">
    <div class="card-header">
        <h5>Times of Day</h5>
    </div>
    <div class="card-block table-border-style">
        <div class="table-responsive">
            <table class="table table-hover">
                <thead>
                    <tr>
                        <th>#</th>
                        <th>Title</th>
                        <th>Notes</th>
                        <th><i>i</i></th>
                    </tr>
                </thead>
                <tbody>
                    @foreach($times as $time)
                    <tr>
                        <th scope="row"><?php echo $key; ?></th>
                        <td>{{$time->name}}</td>
                        <td>{{$time->notes}}</td>
                        <td><a href="<?php echo url('/indicator/timeofday?id=')?>{{$time->id}}" class="ti-pencil"></a> &nbsp;
                        <?php if($time->status == 1){ ?>
                        <a href="<?php echo url('/indicator/disabletime?id=')?>{{$time->id}}" class="ti-close label label-danger"></a> </td>
                        <?php } ?> </td>
                    </tr>
                    <?php $key++;?>
                    @endforeach
                </tbody>
            </table>
        </div>
    </div>
</div>