@extends('admin.layouts.app') @section('title', 'History — '.$def['label']) @section('page-title', 'Page Builder · '.$def['label']) @section('content')
← Back to editor

↺ Revision history — {{ $def['icon'] }} {{ $def['label'] }}

{{ $revisions->count() }} revision(s) · page_key {{ $key }} · restoring only writes back into THIS page
Open editor 👁 Preview draft
@if (session('success'))
✔ {{ session('success') }}
@endif @if ($errors->any())
⚠ {!! $errors->first() !!}
@endif
How this works. Every draft save and every publish stores a full snapshot (page SEO + all sections). Restoring copies a snapshot back into the live draft — the public site keeps serving the published version until you press Publish again.
@if ($revisions->isEmpty())
No revisions yet — publish this page to start its history.
@else @foreach ($revisions as $rev)
@if ($rev->action === 'publish')🚀@elseif ($rev->action === 'restore')↶@else💾@endif
{{ ['publish' => 'Published', 'save_draft' => 'Draft saved', 'restore' => 'Revision restored'] [$rev->action] ?? $rev->action }} {{ $rev->created_at->format('d M Y, H:i') }} · {{ $rev->user?->name ?? 'system' }} · {{ count($rev->payload['sections'] ?? []) }} section(s)
{{ $rev->action }} @if ($rev->action === 'publish')
@csrf
@endif
@endforeach @endif @endsection