JFIF  x x C         C     "        } !1AQa "q2#BR$3br %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz        w !1AQ aq"2B #3Rbr{ gilour

File "admin_list.blade.php"

Full Path: /var/www/laravel_filter/resources/views/admin/admin_list.blade.php
File size: 3.49 KB
MIME-type: text/html
Charset: utf-8

@extends('admin.master_layout')
@section('title')
<title>{{__('admin.Admin List')}}</title>
@endsection
@section('admin-content')
      <!-- Main Content -->
      <div class="main-content">
        <section class="section">
          <div class="section-header">
            <h1>{{__('admin.Admin List')}}</h1>
          </div>

          <div class="section-body">
            <a href="{{ route('admin.admin-list.create') }}" class="btn btn-primary"><i class="fas fa-plus"></i> {{__('admin.Add New')}}</a>
            <div class="row mt-4">
                <div class="col">
                  <div class="card">
                    <div class="card-body">
                      <div class="table-responsive table-invoice">
                        <table class="table table-striped" id="dataTable">
                            <thead>
                                <tr>
                                    <th>{{__('admin.SN')}}</th>
                                    <th>{{__('admin.Name')}}</th>
                                    <th>{{__('admin.Email')}}</th>
                                    <th>{{__('admin.Status')}}</th>
                                    <th>{{__('admin.Action')}}</th>
                                  </tr>
                            </thead>
                            <tbody>
                                @foreach ($admins as $index => $admin)
                                    <tr>
                                        <td>{{ ++$index }}</td>
                                        <td>{{ $admin->name }}</td>
                                        <td>{{ $admin->email }}</td>

                                        <td>
                                            @if($admin->status == 'active')
                                                <span class="badge badge-success">{{__('admin.active')}}</span>
                                            @else
                                                <span class="badge badge-danger">{{__('admin.active')}}</span>
                                            @endif
                                        </td>

                                        <td>

                                            @if ($admin->admin_type == 1)
                                            <a href="{{ route('admin.edit-profile') }}" class="btn btn-primary btn-sm"><i class="fa fa-edit" aria-hidden="true"></i></a>
                                            @else
                                            <a href="{{ route('admin.admin-list.edit', $admin->id) }}" class="btn btn-primary btn-sm"><i class="fa fa-edit" aria-hidden="true"></i></a>
                                            @endif

                                            @if ($admin->admin_type == 0)
                                                <a href="javascript:;" data-toggle="modal" data-target="#deleteModal" class="btn btn-danger btn-sm" onclick="deleteData({{ $admin->id }})"><i class="fa fa-trash" aria-hidden="true"></i></a>
                                            @endif

                                        </td>

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

<script>
    function deleteData(id){
        $("#deleteForm").attr("action",'{{ url("admin/admin-list/") }}'+"/"+id)
    }

</script>
@endsection