Viewing file: login_logs.blade.php (2.59 KB) -rw-r--r-- Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
@extends('layouts.master')
@section('title') Agent Login Logs @endsection
@section('content')
@component('components.breadcrumb')
@slot('li_1') Agent @endslot
@slot('title')Login Logs @endslot
@endcomponent
<div class="row">
<div class="col-lg-12">
<div class="card">
<div class="card-body">
<h4 class="mb-3">Agent Login Logs</h4>
<div class="table-responsive">
<table class="table table-bordered table-hover" id="loginLogTable">
<thead>
<tr>
<th>#</th>
<th>Agent ID</th>
<th>Agent Name</th>
<th>Device</th>
<!-- <th>Device Info</th> -->
<th>Type</th>
<th>Date/Time</th>
</tr>
</thead>
<tbody>
@foreach($logs as $i => $log)
<tr>
<td>{{ $i + 1 }}</td>
<td>{{ $log->user ? $log->user->agent_id : 'N/A' }}</td>
<td>{{ $log->user ? $log->user->name : 'N/A' }}</td>
<td>{{ $log->device == 1 ? 'Web Application' : 'Tab Application' }}</td>
<!-- <td>{{ $log->device_info }}</td> -->
<td>{{ ucfirst($log->type) }}</td>
<td>{{ $log->created_at->setTimezone('Asia/Dhaka')->format('Y-m-d H:i:s') }}</td>
</tr>
@endforeach
@if($logs->isEmpty())
<tr>
<td colspan="6" class="text-center">No logs found.</td>
</tr>
@endif
</tbody>
</table>
</div>
@if(method_exists($logs, 'links'))
<div class="mt-3">
{{ $logs->links() }}
</div>
@endif
</div>
</div>
</div>
</div>
@endsection
@section('script')
<script>
$(document).ready(function () {
$('#loginLogTable').DataTable({
order: [[5, 'desc']],
pageLength: 25
});
});
</script>
@endsection
|