71 lines
3.1 KiB
PHP
71 lines
3.1 KiB
PHP
@extends('administrator.layout.master')
|
|
@section('content')
|
|
@if (auth()->guard('admins')->user()->can('manager system log'))
|
|
<div class="card card-outline card-primary">
|
|
<div class="card-body">
|
|
<table class="table table-invoice table-bordered">
|
|
<colgroup>
|
|
<col width="10%">
|
|
<col width="60%">
|
|
<col width="10%">
|
|
<col width="10%">
|
|
<col width="10%">
|
|
</colgroup>
|
|
<thead>
|
|
<tr>
|
|
<th scope="col">Date</th>
|
|
<th scope="col">Description</th>
|
|
<th scope="col">Customer</th>
|
|
<th scope="col">Username</th>
|
|
<th scope="col">Client IP</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
@if (count($logs) > 0)
|
|
@foreach ($logs->all() as $item)
|
|
<tr>
|
|
<td>
|
|
{{ $item->created_at }}
|
|
</td>
|
|
<td class="text-wrap">
|
|
{{ $item->description }}
|
|
</td>
|
|
<td>
|
|
@if ($item->Customer)
|
|
<a href="{{ route('customer.info', ['userid' => $item->customer_id]) }}">Customer
|
|
Code {{ $item->customer_id }}</a>
|
|
<br>
|
|
<small>{{ $item->customer->email }}</small>
|
|
@else
|
|
<p>None</p>
|
|
@endif
|
|
</td>
|
|
<td class="text-center">
|
|
{{ $item->username }}
|
|
</td>
|
|
<td class="text-center">
|
|
{{ $item->client_ip }}
|
|
</td>
|
|
</tr>
|
|
@endforeach
|
|
@else
|
|
<tr>
|
|
<td colspan="8">
|
|
No Records Found
|
|
</td>
|
|
</tr>
|
|
@endif
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<div class="card-footer">
|
|
{{ $logs->withQueryString()->links() }}
|
|
</div>
|
|
</div>
|
|
@else
|
|
<div class="alert alert-danger alert-dismissible">
|
|
<h5 class="mb-0"><i class="icon fas fa-ban"></i> Access Denied - You are not assigned to System Log</h5>
|
|
</div>
|
|
@endif
|
|
@endsection
|