@extends('layouts.admin.master') @section('title') {{ isset($banner) && $banner ? 'Edit Banner' : 'Add Banner' }} @endsection @section('body')
Dashboard› Banners› {{ $isEdit ? 'Edit' : 'Add' }}
← Back

{{ $isEdit ? '✏️ Edit Banner' : '+ Add New Banner' }}

{{ $isEdit ? 'Update banner details, images and schedule.' : 'Upload desktop and mobile versions for best results.' }}

@if($errors->any())
⚠️ @foreach($errors->all() as $e){{ $e }}. @endforeach
@endif
@csrf @if($isEdit) @method('POST') @endif
{{-- ═══════════ LEFT: FORM ═══════════ --}}
{{-- STEP 1: IMAGES --}}
1️⃣

Banner Images

{{-- Desktop image --}}
🖼️
Click to upload or drag & drop
JPG, PNG, WebP — Max 2MB
Recommended: 1920 × 400 px
@if($isEdit && $banner->image_desktop) @else @endif
@if($isEdit && $banner->image_desktop) ✓ Desktop image set. Upload new file to replace. @endif
{{-- Mobile image --}}
📱
Click to upload or drag & drop
JPG, PNG, WebP — Max 1MB
Recommended: 750 × 400 px
@if($isEdit && $banner->image_mobile) @else @endif
@if($isEdit && $banner->image_mobile) ✓ Mobile image set. Upload new file to replace. @endif
{{-- STEP 2: DETAILS --}}
2️⃣

Banner Details

Shown in admin only — not visible to customers
Where this banner appears on the site
Lower = shown first
{{-- STEP 3: SCHEDULE --}}
3️⃣

Schedule (optional)

Leave blank = always active
Leave blank = no expiry
Active
Toggle off to pause without deleting
{{-- ACTIONS --}}
Cancel
{{-- end left --}} {{-- ═══════════ RIGHT: LIVE PREVIEW ═══════════ --}}
👁️

Live Preview

{{-- Device toggle --}}
Desktop
Mobile
{{-- Desktop preview --}}
Desktop preview
1920 × 400
Displays at full width on screens ≥ 1024px
{{-- Mobile preview --}} {{-- Info panel --}}
Size Guide
🖥️ Desktop
1920 × 400 px
JPG/PNG · Max 2MB
Ratio: 48:10
📱 Mobile
750 × 400 px
JPG/PNG · Max 1MB
Ratio: 15:8
{{-- end right --}}
{{-- end form-layout --}}
@section('script') @endsection @endsection