@php use \Illuminate\Support\Js; @endphp
@foreach($this->getActivities() as $activityItem)
@if ($activityItem->causer) @endif
{{ $activityItem->causer?->name }} @lang('filament-activity-log::activities.events.' . $activityItem->event) {{ $activityItem->created_at->format(__('filament-activity-log::activities.default_datetime_format')) }}
@if ($this->canRestoreActivity()) @lang('filament-activity-log::activities.table.restore') @endif
@lang('filament-activity-log::activities.table.field') @lang('filament-activity-log::activities.table.old') @lang('filament-activity-log::activities.table.new') @php /* @var \Spatie\Activitylog\Models\Activity $activityItem */ $changes = $activityItem->getChangesAttribute(); @endphp @foreach(data_get($changes, 'attributes', []) as $field => $change) @php $oldValue = data_get($changes, "old.{$field}"); $newValue = data_get($changes, "attributes.{$field}"); @endphp $loop->even])> {{ $this->getFieldLabel($field) }} @if(is_array($oldValue))
{{ json_encode($oldValue, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES) }}
@else {{ $oldValue }} @endif
@if(is_array($newValue))
{{ json_encode($newValue, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES) }}
@else {{ $newValue }} @endif
@endforeach
@endforeach