Current File : //home/tradevaly/demo.tradevaly.com.bd/resources/views/backend/users/index.blade.php
@extends('layouts.backend')
    @section('content')  
<!-- Container Fluid-->
            <div class="row">
                <div class="col-lg-12">
                  <!-- Form Basic -->
                  <div class="card mb-4">
                    <div class="card-header card-header-modify py-3 d-flex flex-row align-items-center justify-content-between">
                      <h6 class="m-0 font-weight-bold text-heading-bar">Users</h6>
                        <a href="{{route('users.create')}}" class="btn btn-default-index  btn-sm text-right "><i class="fas fa-plus-circle"></i> Add New User</a>
                    </div>
                    <div class="card-body">
                          <table class="table table-bordered">
                            <tr>
                               <th>No</th>
                               <th>Name</th>
                               <th>Email</th>
                               <th>Roles</th>
                               <th width="280px">Action</th>
                             </tr>
                             
                            @foreach ($data as $key => $d)
                                <tr>                                  
                                    <td>{{ ++$i }}</td>
                                    <td>{{ $d->name }}</td>
                                    <td>{{ $d->email }}</td>
                                    <td>
                                      @if(!empty($d->getRoleNames()))
                                        @foreach($d->getRoleNames() as $v)
                                           <label class="badge badge-success">{{ $v }}</label>
                                        @endforeach
                                      @endif
                                    </td>

                                  <td>
                                    
                                    
                                    <a class="btn btn-primary btn-sm" href="{{ route('users.edit',$d->id) }}"><i class="fas fa-edit"></i></a>
                                     
                                    
                                      <a class="btn btn-danger btn-sm show-modal" href="#" data-toggle="tooltip" data-placement="top" title="Delete" value-id="{{$d->id}}" value-title="Delete" message= "Are you sure? You want to delete ?" method="Post" action="users" ><i class="fa fa-trash fa-lg" aria-hidden="true"></i></a>

                                  </td>
                                </tr>

                               @endforeach
                        </table>
                        <br/>
                        {!! $data->render() !!}
                    </div>
                  </div>
                
              </div>
            </div>
          <!--Row-->


    @endsection