<tr>
  <td>{{ $user->id }}</td>
  <td>{{ $user->first_name }}</td>
  <td>{{ $user->username }}</td>
  <td>{{ getField("Role","id",$user->role_id,"role_name") }}</td>
  <?php
  $status = "label-info";
  if ($user->status == "inactive") $status = "label-danger";
  if ($user->status == "suspended") $status = "label-warning";

   ?>
  <td><span class="label {{$status}}">{{ ucfirst($user->status) }}</span></td>
  @if(UserRole::has('edit_user') || UserRole::has('delete_user'))
  <td>
    @if(UserRole::has("edit_user"))
      <a href="{{ Route("user.edit",$user->id) }}" class="btn btn-xs btn-info"><i class="fa fa-edit"></i> {{Trans("dashboard.crud.edit")}}</a>
    @endif
    @if(UserRole::has("delete_user"))
      <a href="#" class="btn btn-xs btn-danger" data-toggle="modal" data-target="#myModal{{$user->id}}"><i class="fa fa-trash"></i> {{Trans("dashboard.crud.remove")}}</a>
    @include('layouts.includes.modals.danger', ['model' => $user,'toRoute'=>'user','attribute'=>'first_name'])
    @endif
  </td>
  @endif
</tr>
