{{-- resources/views/admin/content/sliders/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 $items */ /** @var array $filters */ $has = fn(string $c) => in_array(strtolower($c), $columns ?? [], true); // استنتاج القيم المتاحة للفلاتر من النتائج الحالية $locales = $has('locale') ? collect($items->items())->pluck('locale')->filter()->unique()->values()->all() : []; $positions = $has('position') ? collect($items->items())->pluck('position')->filter()->unique()->values()->all() : []; // فورمات تواريخ $fmt = function($dt) { return $dt ? \Illuminate\Support\Carbon::parse($dt)->format('Y-m-d H:i') : '—'; }; // بناء رابط صورة (يدعم http/https أو مسار تخزين) $imgUrl = function($path) { if (!$path) return null; $s = (string) $path; if (str_starts_with($s, 'http://') || str_starts_with($s, 'https://') || str_starts_with($s, '/')) return $s; return asset('storage/' . ltrim($s, '/')); }; @endphp @section('content')
| # | @endif @if($has('image_path'))الصورة | @endif @if($has('title'))العنوان | @endif @if($has('position'))Position | @endif @if($has('is_active'))الحالة | @endif @if($has('starts_at'))يبدأ | @endif @if($has('ends_at'))ينتهي | @endif @if($has('locale'))اللغة | @endif @if($has('sort_order'))الترتيب | @endif @if($has('updated_at'))آخر تحديث | @endifإجراءات | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| #{{ $row->id }} | @endif @if($has('image_path'))
@if($thumb)
|
@endif
@if($has('title'))
@if(Route::has('admin.content.sliders.edit'))
{{ $row->title ?? '—' }}
@else
{{ $row->title ?? '—' }}
@endif
@if($has('link_url') && !empty($row->link_url))
@endif
|
@endif
@if($has('position'))
{{ $row->position ?? '—' }} | @endif @if($has('is_active'))@if($live) فعّال @elseif($active && !$inRange) خارج الجدولة @else معطّل @endif | @endif @if($has('starts_at')){{ $fmt($row->starts_at ?? null) }} | @endif @if($has('ends_at')){{ $fmt($row->ends_at ?? null) }} | @endif @if($has('locale')){{ strtoupper($row->locale ?? '-') }} | @endif @if($has('sort_order')){{ $row->sort_order ?? 0 }} | @endif @if($has('updated_at')){{ $fmt($row->updated_at ?? null) }} | @endif|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
لا توجد بنرات بعد.
@if(Route::has('admin.content.sliders.create'))
@endif
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||