@extends('admin.layouts.app') @section('title', __('admin.promotions.title')) @section('content')
@if(($promotions ?? collect())->isEmpty())
{{ __('admin.promotions.no_promotions') }}
@else @foreach($promotions as $promo) @endforeach
{{ __('common.table.code') }}{{ __('common.table.type') }}{{ __('common.table.value') }}{{ __('admin.promotions.uses') }}{{ __('admin.promotions.expires') }}{{ __('common.table.status') }}{{ __('common.table.actions') }}
{{ $promo->code }} {{ $promo->type }} {{ $promo->type === 'percentage' ? $promo->value . '%' : '$' . number_format($promo->value, 2) }} {{ $promo->uses ?? 0 }}{{ $promo->max_uses ? ' / ' . $promo->max_uses : '' }} {{ $promo->expiry_date?->format('d M Y') ?? __('admin.promotions.never') }} {{ $promo->active ? __('common.status.active') : __('common.status.inactive') }}
@csrf @method('DELETE')
@endif
@endsection