Workspace / Audit log

Audit log

Every contact change, captured automatically.

@if ($activities->isEmpty())

No tracked activity yet.

@else
    @foreach ($activities as $a) @php $causerName = $a->causer?->name ?? 'system'; $event = $a->event ?? $a->description; $changes = $a->properties['attributes'] ?? []; $old = $a->properties['old'] ?? []; @endphp
  • {{ collect(explode(' ', $causerName))->map(fn ($w) => $w[0] ?? '')->take(2)->implode('') ?: '?' }}

    {{ $causerName }} {{ $event }}d @if ($a->subject) {{ $a->subject->name ?? 'contact #'.$a->subject_id }} @endif

    {{ $a->created_at->diffForHumans() }}
    @if (! empty($changes))
    @foreach ($changes as $field => $newVal) @if (in_array($field, ['updated_at', 'last_contacted_at'])) @continue @endif
    {{ $field }} @if (array_key_exists($field, $old)) {{ \Illuminate\Support\Str::limit((string) $old[$field], 30) }} → {{ \Illuminate\Support\Str::limit((string) $newVal, 30) }} @else {{ \Illuminate\Support\Str::limit((string) $newVal, 60) }} @endif
    @endforeach
    @endif
  • @endforeach
{{ $activities->links() }}
@endif