Causer Information
{{ class_basename($activity->causer_type) }}
@if (class_basename($activity->causer_type) === 'User') {{ $activity->causer_id .' | '. $activity->causer->name_private }} @else {{ $activity->causer_id.' | '. class_basename($activity->causer_type) }} @endif
{{ $activity->created_at->diffForHumans() . ' | ' .$activity->created_at->format('d.M') }}
Subject Information
{{ class_basename($activity->subject_type) }}
{{ $activity->subject_id }}
{{ $activity->subject->name ?? 'N/A' }}
{{ $activity->event }}
Field | New Value | Old Value | {{-- Check if 'attributes' key exists --}} @foreach($activity->changes['attributes'] as $field => $newValue) @if(!is_array($newValue))
---|---|---|
{{ $field }} | {{ $newValue }} | {{-- Check if 'old' key exists --}}{{ $activity->changes['old'][$field] ?? 'N/A' }} | {{ $field.'.'.$subField}} | {{ $newSubFieldValue }} | {{-- Check if 'old' key exists --}}{{ $activity->changes['old'][$field][$subField] ?? 'N/A' }} | @endforeach @endif @endforeach