@extends('layout/master2')

@section('contentchild')
    <style>

.help-block{
  color:red;
}
.is-invalid{border:1px solid red !important;}
      </style>          
<div class="col-sm-12">
                         

 @foreach(["success","error"] as $status)
@if(Session::has($status))
<div class="alert alert-{{$status}} alert-dismissible">
  <a href="#" class="close" data-dismiss="alert" aria-label="close">&times;</a>
  <strong>{{$status}}!</strong> {{Session::get($status)}} action.
</div>
@endif
@endforeach
  <?php 
$catelist=App\User::select("*")->where('role', 'superviser')->get();
//dd($catelist->all());
  ?>   
 <div class="card mb-4">
<div class="card-header">
<i class="fas fa-table mr-1"></i>
     Superviser List
</div>  
 <div class="card-body">  
<div class="table-responsive">
<table class="table table-bordered" id="dataTable" width="100%" cellspacing="0">

<thead>
<tr>
  
  <th>Sr No.</th><th>Superviser Name</th> <th>Email</th> <th>Opening Balance</th> <th>Action</th>
</tr>

</thead>
<tbody>


<?php $i=0; ?>
@foreach($catelist as $cat)

<tr>
  <td>{{ ++$i }}</td>
  <td>{{$cat->name}}</td>
  <td>{{ $cat->email }}</td>
  <td>{{ $cat->opening_balance   }}</td>
  <td>
    <a href="{{url('subcategory',['id'=>$cat->id]) }}" class="btn btn-success btn-sm">Edit </a> 
   <!--<a  onclick="return confirm('Are You Sure Want To Delete ?')"  href="{{url('deletewala',['id'=>$cat->id,$cat->getTable()])}}" class="btn btn-danger btn-sm">Delete </a>-->
   </td>

</tr>
@endforeach
</tbody>
</table>
</div>
                             
        </div>
</div>
                             
        </div>


     @endsection
             