{{-- expects $article (Article|null), $categories (Collection), $subcategories (Collection) --}} @php $isEdit = (bool) ($article?->id); $selCategory = old('category_id', $article->category_id ?? ''); $selSubcat = old('subcategory_id', $article->subcategory_id ?? ''); $selTitle = old('title', $article->title ?? ''); $selAuthor = old('author', $article->author ?? ''); $selPublish = old('publish_date', optional($article?->publish_date)->format('Y-m-d') ?? ''); $selArticle = old('article', $article->article ?? ''); @endphp
@csrf {{-- Row 1: Title (full width) --}}
@error('title')
{{ $message }}
@enderror
{{-- Row 2: Author / Category / Subcategory --}}
@error('author')
{{ $message }}
@enderror
@error('category_id')
{{ $message }}
@enderror
@error('subcategory_id')
{{ $message }}
@enderror
{{-- Row 3: Publish date (compact, on its own line) --}}
{{-- Flatpickr swaps this for a visible dd-mm-Y input and writes Y-m-d back here on submit. --}} @error('publish_date')
{{ $message }}
@enderror
{{-- Row 4: Article body (CKEditor 5 replaces this textarea) --}}
@error('article')
{{ $message }}
@enderror
Back to list