laravelEcomm/resources/views/Dashboard/customers.blade.php

105 lines
4.9 KiB
PHP

<x-adminheader title="Customers" />
<!-- partial -->
<div class="main-panel">
<div class="content-wrapper">
<div class="row">
<div class="col-md-12 grid-margin">
<div class="row">
<div class="col-12 col-xl-8 mb-4 mb-xl-0">
<h3 class="font-weight-bold">Welcome Aamir</h3>
<h6 class="font-weight-normal mb-0">All systems are running smoothly!
</h6>
</div>
<div class="col-12 col-xl-4">
<div class="justify-content-end d-flex">
<div class="dropdown flex-md-grow-1 flex-xl-grow-0">
<button class="btn btn-sm btn-light bg-white dropdown-toggle" type="button"
id="dropdownMenuDate2" data-toggle="dropdown" aria-haspopup="true"
aria-expanded="true">
<i class="mdi mdi-calendar"></i> Today (10 Jan 2021)
</button>
<div class="dropdown-menu dropdown-menu-right" aria-labelledby="dropdownMenuDate2">
<a class="dropdown-item" href="#">January - March</a>
<a class="dropdown-item" href="#">March - June</a>
<a class="dropdown-item" href="#">June - August</a>
<a class="dropdown-item" href="#">August - November</a>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-md-12 grid-margin stretch-card">
<div class="card">
<div class="card-body">
<p class="card-title mb-0">Our Customers</p>
<div class="table-responsive">
@php
use Illuminate\Support\Facades\URL;
@endphp
<table class="table table-striped table-bordered" id="product-table">
<thead>
<tr>
<th>ID</th>
<th>Name</th>
<th>Picture</th>
<th>Email</th>
<th>Type</th>
<th>Created At</th>
<th>Status</th>
<th>Actions</th>
</tr>
</thead>
<tbody>
@php
$i = 0;
@endphp
@foreach ($customers as $customer)
@php
$i++;
@endphp
<tr>
<td>{{ $i }}</td>
<td>{{ $customer->name }}</td>
<td><img src="{{ asset('uploads/profiles/' . $customer->picture) }}"
alt="" class="img-fluid rounded mx-auto d-block"></td>
<td>{{ $customer->email }}</td>
<td>{{ $customer->type }}</td>
<td>{{ $customer->created_at }}</td>
<td>{{ $customer->status }}</td>
<td>
@if ($customer->status == 'Active')
<a class="btn btn-danger"
href="{{ url::to('changeUserStatus/Blocked', ['id' => $customer->id]) }}">Block</a>
@else
<a class="btn btn-success"
href="{{ url::to('changeUserStatus/Active', ['id' => $customer->id]) }}">Active</a>
@endif
</td>
@endforeach
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- content-wrapper ends -->
<x-adminfooter />