@extends('layouts.admin') @section('title', 'Audit Log') @push('styles') @endpush @section('content')

Audit Log

Every action recorded by ActivityLogger. Filter by user, action, IP or date range.

@if(! $tableExists)
Audit table not provisioned yet
The activity_logs table doesn't exist on this database. Run php artisan migrate to create it.
@else
@if($logs->isEmpty())
No log entries match those filters.
@else @foreach($logs as $log) @endforeach
When User Action Description IP
{{ \Carbon\Carbon::parse($log->created_at)->format('M d, H:i') }}
{{ \Carbon\Carbon::parse($log->created_at)->diffForHumans() }}
{{ $log->user_name ?? '—' }}
{{ $log->user_email ?? '—' }}
{{ $log->action }} {{ $log->description }} @if(! empty($log->metadata)) @php $meta = is_string($log->metadata) ? json_decode($log->metadata, true) : (is_array($log->metadata) ? $log->metadata : []); @endphp @if(! empty($meta))
{{ json_encode($meta, JSON_UNESCAPED_SLASHES | JSON_PRETTY_PRINT) }}
@endif @endif
{{ $log->ip_address ?? '—' }}
{{ $logs->links() }}
@endif @endif @endsection