{{-- resources/views/admin/content/sliders/edit.blade.php --}} @extends('admin.layouts.app') @section('title', 'تعديل بنر/سلايد') @php /** @var string $table */ /** @var array $columns */ /** @var object $item */ $has = fn(string $c) => in_array(strtolower($c), $columns ?? [], true); $val = function(string $k, $fallback = null) use ($item) { $k = strtolower($k); return old($k, isset($item->$k) ? $item->$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 ''; } }; $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,'/')); }; $thumb = $has('image_path') ? $imgUrl($val('image_path')) : null; @endphp @push('styles') @endpush @section('content')

تعديل بنر/سلايد

#{{ $item->id ?? '—' }} {{ $table }}
رجوع @if(Route::has('admin.content.sliders.destroy'))
@csrf @method('DELETE')
@endif
@if (session('success'))
{{ session('success') }}
@endif @if (session('danger'))
{{ session('danger') }}
@endif @if ($errors->any())
تحقق من الأخطاء:
@endif
@csrf
@if($has('title'))
@endif @if($has('position'))
@endif @if($has('locale'))
@endif @if($has('link_url'))
@if($val('link_url')) @endif
@endif @if($has('button_text'))
@endif @if($has('sort_order'))
@endif @if($has('starts_at'))
@endif @if($has('ends_at'))
@endif @if($has('bg_color'))
@endif @if($has('text_color'))
@endif @if($has('is_active'))
@endif
@if($has('description'))
الوصف (اختياري)
@endif @if($has('image_path'))
الصورة يمكنك رفع ملف جديد أو تعديل المسار الحالي
@if($thumb)
المعاينة الحالية:
banner
@endif
يُحفظ في storage/app/public/sliders ويُعرض عبر /storage/...
@endif
@endsection