{{-- resources/views/admin/content/pages/index.blade.php --}} @extends('admin.layouts.app') @section('title', $pageTitle ?? 'الصفحات') @php use Illuminate\Support\Facades\Route; /** @var string $table */ /** @var array $columns */ /** @var \Illuminate\Contracts\Pagination\LengthAwarePaginator $pages */ /** @var array $filters */ $has = fn(string $c) => in_array(strtolower($c), $columns ?? [], true); // استنتاج قائمة اللغات من العناصر الحالية إن وُجد عمود locale $locales = []; if ($has('locale')) { $locales = collect($pages->items())->pluck('locale')->filter()->unique()->values()->all(); } @endphp @section('content')

الصفحات ({{ number_format($pages->total()) }})

@if(Route::has('admin.content.pages.create')) صفحة جديدة @endif
{{-- فلاتر --}}
@if($has('status'))
@endif @if($has('locale'))
@endif
{{-- الجدول --}}
@if($has('id')) @endif @if($has('title')) @endif @if($has('slug')) @endif @if($has('status')) @endif @if($has('locale')) @endif @if($has('published_at')) @endif @if($has('updated_at')) @endif @forelse($pages as $row) @if($has('id')) @endif @if($has('title')) @endif @if($has('slug')) @endif @if($has('status')) @endif @if($has('locale')) @endif @if($has('published_at')) @endif @if($has('updated_at')) @endif @empty @endforelse
#العنوانالسلاقالحالةاللغةتاريخ النشرآخر تحديثإجراءات
#{{ $row->id }}
@if(Route::has('admin.content.pages.edit')) {{ $row->title ?? '—' }} @else {{ $row->title ?? '—' }} @endif
@if($has('canonical_url') && !empty($row->canonical_url)) {{ $row->canonical_url }} @elseif($has('slug') && !empty($row->slug)) {{-- رابط الواجهة الأمامية الافتراضي --}} {{ url('/page/' . $row->slug) }} @endif
{{ $row->slug }} @php $badge = [ 'published' => 'success', 'draft' => 'secondary', 'archived' => 'warning', ][$row->status] ?? 'secondary'; @endphp {{ $row->status ?? '—' }} {{ strtoupper($row->locale ?? '-') }}{{ $row->published_at ? \Illuminate\Support\Carbon::parse($row->published_at)->format('Y-m-d H:i') : '—' }}{{ $row->updated_at ? \Illuminate\Support\Carbon::parse($row->updated_at)->format('Y-m-d H:i') : '—' }}
@if(Route::has('admin.content.pages.edit')) @endif @if(Route::has('admin.content.pages.destroy'))
@csrf @method('DELETE')
@endif
لا توجد صفحات بعد. @if(Route::has('admin.content.pages.create')) @endif
{{-- ترقيم --}}
{{ $pages->links() }}
@endsection @push('scripts') @endpush