@php $isEdit = isset($banner); $disk = config('upload.disk'); $bannerType = old('banner_type', $banner->banner_type ?? 'single'); // Recommended banner dimensions, mirrored 1:1 by BANNER_SIZES in the script // below so the guidelines box and the live hint can never drift apart. $bannerSizes = ['full' => [1100, 450], 'half' => [525, 260]]; $maxImageMb = round(config('upload.max_size.banner') / 1024, 1); @endphp
@error('title')
{{ $message }}
@enderror
{{-- slot is a required, uniqueness-scoped field on the backend (only one published banner per slot) that the homepage template depends on to know where each banner renders — kept as a hidden default rather than removed outright so create/update keep working. --}} @error('slot')
{{ $message }}
@enderror
Multiple lets you add several images, each Full Row or Half Row.
@error('status')
{{ $message }}
@enderror
{{-- alt_text, subtitle, description stay as hidden inputs: all nullable/no dependent logic, kept only so Create still writes a sane empty default like before. display_order is NOT a constant, though — with slot also fixed above, every banner shares the same slot, so a hardcoded "0" would collide with any banner already in that slot (display_order is unique per slot) and silently fail validation with no visible field to show the error on. $nextDisplayOrder (create-only, computed in the controller) keeps each new banner's order unique. --}} @error('display_order')
{{ $message }}
@enderror
{{-- Guidance-only layout switch. Deliberately has NO name attribute, so it is never submitted and cannot affect how a Single banner is saved or rendered — it only drives the recommended-size hint and the dimension warning below. --}}
Sets the recommended image size shown below — it does not change how the banner is saved.

Recommended Size: {{ $bannerSizes['full'][0] }} × {{ $bannerSizes['full'][1] }} px

Desktop banner
Drag & drop or click to upload PNG, JPG or WEBP
{{-- Non-blocking size mismatch notice, filled in by JS. Warning only: the upload is never prevented. --}} @error('image_desktop')
{{ $message }}
@enderror
Click the + tile to add one or more images.
@error('new_images')
{{ $message }}
@enderror
Choose how each image appears on the homepage — Full Row (large, alone) or Half Row (paired side by side with the next Half Row image).
{{-- Sits after both upload sections, so it always renders directly below whichever upload area is visible (Single or Multiple). --}}
Banner Upload Guidelines
@if ($isEdit)

Created by {{ $banner->creator?->name ?? '—' }} on {{ $banner->created_at?->format('d M Y, h:i A') }} · Last updated by {{ $banner->updater?->name ?? '—' }} on {{ $banner->updated_at?->format('d M Y, h:i A') }}

@endif
SEO Settings
Cancel