@extends('hr::layouts.app') @section('title', 'Audit Log Details') @section('content')
| Log ID: | {{ $auditLog->id }} |
| Event: | {{ $auditLog->formatted_event }} |
| Model: |
{{ class_basename($auditLog->auditable_type) }}
@if($auditLog->auditable_id)
ID: {{ $auditLog->auditable_id }} @endif |
| User: |
@if($auditLog->user)
{{ $auditLog->user->name }}
{{ $auditLog->user->email }} @else System @endif |
| Date/Time: |
{{ $auditLog->created_at->format('M d, Y H:i:s') }}
{{ $auditLog->created_at->diffForHumans() }} |
| Changes: |
{{ $auditLog->changes_count }} changes
{{ $auditLog->change_summary }} |
| IP Address: |
@if($auditLog->ip_address)
{{ $auditLog->ip_address }}
@else
Not available
@endif
|
| Method: | @if($auditLog->method) {{ $auditLog->method }} @else Not available @endif |
| URL: | @if($auditLog->url) {{ $auditLog->url }} @else Not available @endif |
| User Agent: | @if($auditLog->user_agent) {{ $auditLog->user_agent }} @else Not available @endif |
| Tags: | @if($auditLog->tags && count($auditLog->tags) > 0) @foreach($auditLog->tags as $tag) {{ $tag }} @endforeach @else None @endif |
| Field | Old Value | New Value |
|---|---|---|
| {{ $field }} |
@if(isset($auditLog->old_values[$field]))
{{ is_array($auditLog->old_values[$field]) ? json_encode($auditLog->old_values[$field]) : $auditLog->old_values[$field] }}
@else
-
@endif
|
@if(isset($auditLog->new_values[$field]))
{{ is_array($auditLog->new_values[$field]) ? json_encode($auditLog->new_values[$field]) : $auditLog->new_values[$field] }}
@else
-
@endif
|
{{ json_encode($auditLog->new_values, JSON_PRETTY_PRINT) }}
@elseif($auditLog->event === 'deleted' && $auditLog->old_values)
{{ json_encode($auditLog->old_values, JSON_PRETTY_PRINT) }}
@else
No data available
@endif
{{ $auditLog->notes }}