@php // create() passes no $post; edit() passes one. Define it so every // $post?->… reference below resolves on the create route too. $post = $post ?? null; $isEdit = (bool) $post; $action = $isEdit ? route('admin.blog.update', $post->id) : route('admin.blog.store'); @endphp
{{ __('Admin') }} {{ __('Blog') }} {{ $isEdit ? __('Edit') : __('New') }}
@if ($isEdit && $post->slug) {{ __('View') }} @endif {{ __('Cancel') }}
{{ __('Admin · Blog · ') }}{{ $isEdit ? __('Edit') : __('New') }}

{{ $isEdit ? __('Edit') : __('Write a') }} {{ __('post') }}

{{ __('Title, content and a category are the essentials. Fill the SEO card to control how the article looks in search results and link previews.') }}

@if ($errors->any())
{{ __('Please fix the following:') }}
    @foreach ($errors->all() as $e)
  • {{ $e }}
  • @endforeach
@endif
@csrf @if ($isEdit) @method('PUT') @endif
{{-- Left: main fields --}}
{{ __('content') }}

{{ __('Article') }}

{{ __('media & meta') }}

{{ __('Featured image & details') }}

{{ __('Featured image') }} @if ($post?->image_url) @endif {{ __('Shown at the top of the article and on listing cards.') }}@if ($post?->image_url) {{ __('Leave blank to keep the current image.') }}@endif
{{-- Right: aside cards --}}