@extends('layouts.admin') @section('title', 'Discounts') @section('page_title', 'Discount & Coupon Management') @section('content')
Add New Discount
@if($search)
Clear Filter Found {{ $discounts->total() }} result(s)
@endif
@forelse($discounts as $discount) @empty @endforelse
Code Type Value Valid From Valid To Usage Status Actions
{{ $discount->code }}
{{ substr($discount->description, 0, 30) }}
{{ ucfirst(str_replace('_', ' ', $discount->type)) }} @if($discount->type == 'percentage') {{ $discount->value }}% @else {{ \App\Support\Currency::symbol() }}{{ number_format($discount->value, 2) }} @endif {{ $discount->valid_from ? $discount->valid_from->format('M d, Y') : 'N/A' }} {{ $discount->valid_to ? $discount->valid_to->format('M d, Y') : 'N/A' }} @if($discount->usage_limit) {{ $discount->usage_count }} / {{ $discount->usage_limit }} @else {{ $discount->usage_count }} (Unlimited) @endif @if($discount->is_active && $discount->isValid()) Active @else Inactive @endif
@csrf @method('DELETE')
@if($search) No discounts found matching "{{ $search }}" @else No discounts found @endif
@if($discounts->count())
@endif @endsection