Current File : //home/tradevaly/public_html/resources/views/backend/pages/userManagement/admin/index.blade.php
@extends('backend.ayaan.master')

@push('title') Users @endpush
@section('css')
    <!-- DataTables -->
    <link href="{{ asset('/assets/libs/datatables/datatables.min.css') }}" rel="stylesheet" type="text/css" />
@endsection
@section('content')

    @component('components.breadcrumb')
        @slot('li_1') Dashboards @endslot
        @slot('title') Users @endslot
    @endcomponent
    
    
    
    <div class="row">
        <div class="col-12">
            <div class="card">
                <div class="card-body">
                    <div class="row mb-2">
                        <div class="col-sm-4"></div>
                        <div class="col-sm-8">
                            <div class="text-sm-end">
                                <a href="{{ route('admin.user_namagement.admin.admin_create') }}"
                                    class="btn btn-success btn-rounded waves-effect waves-light mb-2 me-2"><i
                                        class="mdi mdi-plus me-1"></i> Add New Admin</a>
                            </div>
                        </div><!-- end col-->
                    </div>

                    <div class="table-responsive">
                        <table id="datatable-buttons" class="table table-bordered dt-responsive nowrap w-100">
                            <thead class="table-light text-center">
                                <tr>
                                  <th class="text-center">SL</th>
                                  <th>{{translate('Name')}}</th>
                                  <th>{{translate('Email')}}</th>
                                  <th>{{translate('Role')}}</th>
                                  <th>{{translate('Actions')}}</th>
                                </tr>
                            </thead>
                            <tbody class="text-center">
                                @foreach($admins as $user)
                                @if($user->id != 1)
                               <tr>
                                 <td> {{ $user->index }}</td>
                                 <td> {{ $user->name }}</td>
                                 <td> {{ $user->email }}</td>
                                 <td> <span class="badge bg-info">{{ role_name($user->role_id) }}</span></td>
                                 <td>
                                     <a class="btn btn-danger btn-sm" href="{{ route('admin.user_namagement.admin.admin_destroy', $user->id) }}">Delete</a>
                                     <!--<a class="btn btn-info btn-sm" href="{{ route('admin.user_namagement.role.show', $user->id) }}">Edit</a>-->
                                 </td>
                               </tr>
                                @endif
                                @endforeach
                            </tbody>
                        </table>
                    </div>
                    
                </div>
            </div>
        </div>
    </div>
    <!-- end row -->
    
    
@endsection