@php $record = $getRecord(); $properties = $record->properties ?? []; $formatValue = function ($val, $key = null) { if (is_null($val)) return 'null'; if (is_bool($val)) return $val ? 'true' : 'false'; if (is_array($val) || is_object($val)) { return json_encode($val, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE); } $str = (string) $val; // Format empty HTML tags if ($str === '

' || trim($str) === '') { return '[empty]'; } // Format simple HTML strings if (str_contains($str, '

')) { $stripped = strip_tags($str); return empty(trim($stripped)) ? '[empty]' : trim($stripped); } // Parse date strings if (preg_match('/^\d{4}-\d{2}-\d{2}[T ]\d{2}:\d{2}:\d{2}/', $str)) { try { return \Carbon\Carbon::parse($str)->format('M j, Y H:i:s'); } catch (\Exception $e) { // Fallback to original } } return $str; }; $action = $record->action; $attributes = $properties['attributes'] ?? []; $oldValues = $properties['old'] ?? []; @endphp

@if ($action === 'updated')
@forelse (array_keys($attributes) as $key) @php $old = $oldValues[$key] ?? null; $new = $attributes[$key] ?? null; $hasOld = array_key_exists($key, $oldValues); $changed = $old !== $new; @endphp @empty @endforelse
Field Old Value New Value
{{ $key }} @if ($hasOld) @if ($changed) {{ $formatValue($old, $key) }} @else {{ $formatValue($old, $key) }} @endif @else not set @endif @if ($changed) {{ $formatValue($new, $key) }} @else {{ $formatValue($new, $key) }} @endif
No attributes updated.
@else
@forelse ($attributes as $key => $val) @empty @endforelse
Field Value
{{ $key }} {{ $formatValue($val, $key) }}
No attributes recorded.
@endif