{{-- resources/views/admin/content/pages/edit.blade.php --}} @extends('admin.layouts.app') @section('title', 'تعديل صفحة') @php /** @var string $table */ /** @var array $columns */ /** @var object $page */ $has = fn(string $c) => in_array(strtolower($c), $columns ?? [], true); $val = function(string $k, $fallback = null) use ($page) { $k = strtolower($k); return old($k, isset($page->$k) ? $page->$k : $fallback); }; $fmtDt = function($dt) { if (empty($dt)) return ''; try { return \Illuminate\Support\Carbon::parse($dt)->format('Y-m-d\TH:i'); } catch (\Throwable $e) { return ''; } }; $previewUrl = null; if ($has('canonical_url') && !empty($page->canonical_url)) { $previewUrl = $page->canonical_url; } elseif($has('slug') && !empty($page->slug)) { $previewUrl = url('/page/' . $page->slug); } @endphp @push('styles') @endpush @section('content')

تعديل صفحة

#{{ $page->id ?? '—' }} {{ $table }}
@if($previewUrl) معاينة @endif رجوع @if(Route::has('admin.content.pages.destroy'))
@csrf @method('DELETE')
@endif
@if ($errors->any())
تحقق من الأخطاء:
@endif
@csrf
@if($has('title'))
@endif @if($has('slug'))
يُضمن تميّزه عند الحفظ.
@endif @if($has('locale'))
@endif @if($has('status'))
@php $st = $val('status','draft'); @endphp
@endif @if($has('template'))
@endif @if($has('sort_order'))
@endif @if($has('published_at'))
@endif @if($has('unpublish_at'))
@endif
@if($has('body'))
المحتوى @if($previewUrl) @if($has('slug') && !empty($page->slug)) {{ $previewUrl }} @endif @endif
@endif {{-- SEO --}} @if($has('meta_title') || $has('meta_description') || $has('canonical_url') || $has('og_image') || $has('is_indexable') || $has('redirect_to'))
إعدادات SEO
@if($has('meta_title'))
@endif @if($has('meta_description'))
@endif @if($has('canonical_url'))
@endif @if($has('og_image'))
@endif @if($has('is_indexable'))
@endif @if($has('redirect_to'))
@endif
@endif
@endsection @push('scripts') @endpush