Activity Log

@foreach($activities as $activity)
@switch($activity->event) @case('created') @break @case('updated') @break @case('deleted') @break @default @endswitch

{{ $activity->getCustomDescription() }}

{{ $activity->created_at->diffForHumans() }}

@if($activity->causer) by {{ $activity->causer->name }} @endif @if($activity->subject) on {{ class_basename($activity->subject) }} #{{ $activity->subject->id }} @endif
@if($activity->event === 'updated' && $activity->getDiff())
@foreach($activity->getDiff() as $attribute => $changes)
{{ ucfirst(str_replace('_', ' ', $attribute)) }}: {{ $changes['old'] ?? 'null' }} {{ $changes['new'] ?? 'null' }}
@endforeach
@endif
@endforeach
{{ $activities->links() }}