2025-01-01 17:14:46 +07:00
|
|
|
@extends('layouts.app')
|
|
|
|
|
|
|
|
|
|
@section('title')
|
|
|
|
|
{{ $pageInfo['title'] }}
|
|
|
|
|
@endsection
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@section('admin-content')
|
|
|
|
|
<section class="content-header">
|
|
|
|
|
<div class="container-fluid">
|
|
|
|
|
<div class="row mb-2">
|
|
|
|
|
<div class="col-sm-6">
|
|
|
|
|
<h1>{{ $pageInfo['title'] }}</h1>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="col-sm-6">
|
|
|
|
|
<ol class="breadcrumb float-sm-right">
|
|
|
|
|
<li class="breadcrumb-item"><a href="{{ route('admin.dashboard') }}">{{ __('Dashboard') }}</a></li>
|
|
|
|
|
<li class="breadcrumb-item active"><a href="{{ $pageInfo['path'] }}">{{ $pageInfo['title'] }}</a>
|
|
|
|
|
</li>
|
|
|
|
|
</ol>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</section>
|
|
|
|
|
|
|
|
|
|
<section class="content">
|
|
|
|
|
<div class="container-fluid">
|
|
|
|
|
<div class="row">
|
|
|
|
|
<div class="col-12 mt-5">
|
|
|
|
|
<div class="card">
|
|
|
|
|
<div class="card-body">
|
|
|
|
|
<h4 class="header-title float-left">{{ $pageInfo['title'] }}</h4>
|
|
|
|
|
<div class="clearfix"></div>
|
|
|
|
|
<div class="data-tables">
|
|
|
|
|
@include('backend.layouts.partials.messages')
|
|
|
|
|
<table id="dataTable" class="text-center">
|
|
|
|
|
<thead class="bg-light text-capitalize">
|
|
|
|
|
<tr>
|
|
|
|
|
<th width="5%">{{ __('User') }}</th>
|
|
|
|
|
<th width="5%">{{ __('Ip Address') }}</th>
|
2025-01-01 17:20:37 +07:00
|
|
|
<th width="5%">{{ __('Action') }}</th>
|
|
|
|
|
<th width="15%">{{ __('Activity') }}</th>
|
2025-01-01 17:14:46 +07:00
|
|
|
<th width="5%">Browser</th>
|
|
|
|
|
<th width="15%">User Agent</th>
|
|
|
|
|
</tr>
|
|
|
|
|
</thead>
|
|
|
|
|
<tbody>
|
|
|
|
|
@foreach ($data as $item)
|
|
|
|
|
<tr>
|
|
|
|
|
<td>
|
2025-01-01 17:20:37 +07:00
|
|
|
{{ $item->user ? $item->user->name : preg_replace('/\).*$/', '', explode('(', $item->activity)[1]) }}
|
2025-01-01 17:14:46 +07:00
|
|
|
</td>
|
|
|
|
|
<td>{{ $item->ip_address }}</td>
|
2025-01-01 17:20:37 +07:00
|
|
|
<td>
|
|
|
|
|
@php
|
|
|
|
|
$color = 'info';
|
|
|
|
|
if ($item->action == 'Create') {
|
|
|
|
|
$color = 'success';
|
|
|
|
|
} elseif ($item->action == 'Update') {
|
|
|
|
|
$color = 'warning';
|
|
|
|
|
} elseif ($item->action == 'Delete') {
|
|
|
|
|
$color = 'danger';
|
|
|
|
|
}
|
|
|
|
|
@endphp
|
|
|
|
|
<div class="badge badge-{{ $color }} text-white">
|
|
|
|
|
{{ $item->action }}
|
|
|
|
|
</div>
|
|
|
|
|
</td>
|
2025-01-01 17:14:46 +07:00
|
|
|
<td>{{ $item->activity }}</td>
|
|
|
|
|
<td>{{ $item->browser }}</td>
|
|
|
|
|
<td>{{ $item->user_agent }}</td>
|
|
|
|
|
</tr>
|
|
|
|
|
@endforeach
|
|
|
|
|
</tbody>
|
|
|
|
|
</table>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</section>
|
|
|
|
|
@endsection
|
|
|
|
|
|
|
|
|
|
@section('scripts')
|
|
|
|
|
<script>
|
|
|
|
|
$(document).ready(function () {
|
|
|
|
|
if ($('#dataTable').length) {
|
|
|
|
|
$('#dataTable').DataTable({
|
|
|
|
|
responsive: true,
|
|
|
|
|
dom: 'Bfrtip',
|
|
|
|
|
buttons: [
|
|
|
|
|
'excel', 'pdf', 'print'
|
|
|
|
|
]
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
</script>
|
|
|
|
|
@endsection
|