@csrf
@if ($errors->any())
تعذر حفظ المقالة. راجع الحقول التالية:
@foreach ($errors->all() as $message)
- {{ $message }}
@endforeach
@endif
@php
$selectedCategoryIds = collect(old('categories', isset($article) && $article->exists ? $article->categories->pluck('id')->all() : []))
->map(fn ($id) => (int) $id)
->all();
$selectedTagIds = collect(old('tags', isset($article) && $article->exists ? $article->tags->pluck('id')->all() : []))
->map(fn ($id) => (int) $id)
->all();
$metaBefore = old('meta.before_start', isset($article) ? ($article->meta['before_start'] ?? '') : '');
$metaQuick = old('meta.quick_solutions', isset($article) ? ($article->meta['quick_solutions'] ?? '') : '');
$metaLinks = old('meta.external_links', isset($article) ? ($article->meta['external_links'] ?? []) : []);
if (! is_array($metaLinks) || $metaLinks === []) {
$metaLinks = [['url' => '', 'label' => '']];
}
@endphp
@error('body')
{{ $message }}
@enderror
يظهر القسم في المقالة فقط عند إضافة رابط واحد على الأقل.
@foreach ($metaLinks as $i => $row)
@php
$u = is_array($row) ? ($row['url'] ?? '') : '';
$lbl = is_array($row) ? ($row['label'] ?? '') : '';
@endphp
@endforeach
@once
@push('scripts')
@php
$tinymceToolbar = 'undo redo | blocks | bold italic underline strikethrough | forecolor backcolor | alignright aligncenter alignleft alignjustify | bullist numlist | link image table | removeformat | code | fullscreen';
@endphp
@endpush
@endonce