@extends('layouts.app') @section('title', 'Promotions') @section('nav_promotions', 'bg-teal-50 text-teal-700 font-semibold') @section('page_title', 'Promotions & Offers') @section('page_subtitle', 'Special deals shown on /promos and the homepage') @section('content') @if(session('success'))
{{ session('success') }}
@endif @if($errors->any())
{{ $errors->first() }}
@endif @php $fieldGrid = 'grid grid-cols-1 sm:grid-cols-2 gap-3'; $inp = 'w-full border-[0.5px] border-gray-200 rounded-lg px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-teal-500/20 focus:border-teal-400'; @endphp
{{-- Add --}}

Add a Promotion

@csrf
{{-- List --}} @if($promotions->isEmpty())
No promotions yet. Add one above.
@else
@foreach($promotions as $p)
@if($p->image_path) @else
@endif
{{ $p->title }} @if($p->badge_label){{ $p->badge_label }}@endif @if(!$p->active)Inactive @elseif($p->isExpired())Expired@endif
@if($p->subtitle)

{{ $p->subtitle }}

@endif
@if($p->promo_code)Code: {{ $p->promo_code }}@endif @if($p->price_from)From ₱{{ number_format($p->price_from, 0) }}@endif @if($p->valid_from || $p->valid_until){{ optional($p->valid_from)->format('M j') ?? '…' }} – {{ optional($p->valid_until)->format('M j, Y') ?? '…' }}@endif
Translate
@csrf @method('DELETE')
@csrf @method('PATCH')
@endforeach
@endif
@endsection