{{-- resources/views/admin/promos/index.blade.php --}} @extends('layouts.admin') @section('title', 'Promo Management') @section('page_title', 'Promo Management') @section('icon', 'fa-tags') @section('breadcrumb') @endsection @section('content')
Promotions
Add New Promo
@forelse($promos as $index => $promo) @empty @endforelse
# Name Code Type Discount Value Validity Period Usage Status Actions
{{ $index + 1 }} {{ $promo['name'] }} @if($promo['description'])
{{ Str::limit($promo['description'], 50) }} @endif
@if($promo['code']) {{ $promo['code'] }} @else Auto-apply @endif @php $typeColors = [ 'percentage' => 'primary', 'fixed' => 'success', 'bogo' => 'warning' ]; $typeColor = $typeColors[$promo['type']] ?? 'secondary'; @endphp {{ ucfirst($promo['type']) }} @if($promo['type'] == 'percentage') {{ $promo['discount_value'] }}% @elseif($promo['type'] == 'fixed') Rp {{ number_format($promo['discount_value'], 0, ',', '.') }} @else BOGO @endif @if($promo['max_discount'])
Max: Rp {{ number_format($promo['max_discount'], 0, ',', '.') }} @endif
{{ date('d M Y', strtotime($promo['start_date'])) }}
to
{{ date('d M Y', strtotime($promo['end_date'])) }}
@if(strtotime($promo['end_date']) < time()) Expired @endif
{{ $promo['usage_count'] ?? 0 }} uses
@if($promo['min_purchase'])
Min: Rp {{ number_format($promo['min_purchase'], 0, ',', '.') }}
@endif
@if($promo['is_active']) Active @else Inactive @endif
@csrf @method('PUT')
No promotions found

Try adjusting your search filters or add new promotions

@if(isset($pagination))
Showing {{ $pagination['from'] ?? 0 }} to {{ $pagination['to'] ?? 0 }} of {{ $pagination['total'] ?? 0 }} entries
@endif
@endsection @section('scripts') @endsection