@extends('layouts.admin') @section('title', $isCreate ? 'New post' : $post->title) @section('content') @php $featuredSelected = old('featured_media_asset_id') ? \App\Models\MediaAsset::query()->with('variants')->find(old('featured_media_asset_id')) : ($post->featuredMedia ?? null); $ogSelected = old('og_media_asset_id') ? \App\Models\MediaAsset::query()->with('variants')->find(old('og_media_asset_id')) : ($post->ogMedia ?? null); $selectedCategories = collect(old('category_ids', $post->exists ? $post->categories->pluck('id')->all() : [])); $selectedTags = collect(old('tag_ids', $post->exists ? $post->tags->pluck('id')->all() : [])); $selectedRelated = collect(old('related_ids', $post->exists ? $post->relatedPosts->pluck('id')->all() : [])); $checks = $analysis['checks'] ?? []; $seoScore = old('seo_score', $seo?->seo_score ?? null); $faqJson = old('meta_faq', json_encode(data_get($post->meta, 'faq', []), JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES)); @endphp
@csrf @unless($isCreate) @method('PUT') @endunless Posts @unless($isCreate) View @endunless @if(session('status'))
{{ session('status') }}
@endif @if($errors->any())
{{ $errors->first() }}
@endif

Categories

@forelse($categories as $category) @empty

No categories yet.

@endforelse

Tags

@forelse($tags as $tag) @empty

No tags yet.

@endforelse
@foreach(['general' => 'General', 'social' => 'Social', 'schema' => 'Schema', 'advanced' => 'Advanced'] as $key => $label) @endforeach
{{ old('seo_title', $seo?->title ?? $post->title ?: 'Post title') }}
{{ url('/blogs/news/'.(old('handle', $post->handle) ?: 'post-handle')) }}
{{ old('seo_description', $seo?->description ?? \Illuminate\Support\Str::limit((string) $post->excerpt, 150)) }}
@forelse($allPosts as $candidate) @empty

No other posts yet.

@endforelse
@unless($isCreate)
    @forelse($post->revisions as $revision)
  • {{ $revision->title }} {{ $revision->created_at?->diffForHumans() }}
  • @empty
  • No revisions yet — save to create the first snapshot.
  • @endforelse
@endunless

SEO score

{{ $seoScore !== null ? $seoScore : '—' }}

Readability: {{ $seo?->readability_score ?? '—' }}

    @forelse($checks as $check)
  • {{ ($check['pass'] ?? false) ? '✓' : '!' }} {{ $check['message'] ?? $check['label'] }}
  • @empty
  • Save or recalculate to score this post.
  • @endforelse
@unless($isCreate) @endunless
@unless($isCreate) @endunless @endsection