@php /** @var \App\Models\Revision $revision */ $render = function ($value): string { if ($value === null || $value === '') { return '—'; } return is_scalar($value) ? (string) $value : json_encode($value, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES); }; @endphp {{-- Old beside new, field by field. Reading the difference is the point: "changed the Catalan title" is useful, "saved the page" is not. --}}
{{ $field }}
{{ __('panel.revisions.before') }}
{{ $render($diff['old']) }}
{{ __('panel.revisions.after') }}
{{ $render($diff['new']) }}
{{ __('panel.revisions.no_changes') }}
@endforelse