@extends('admin.layouts.app') @section('title', 'Offers Management') @section('content')
Manage discount offers and promotions
Total Offers
{{ $offers->total() }}
Active Offers
{{ $offers->where('is_active', true)->count() }}
Expiring Soon
{{ $offers->where('end_date', '>', now())->where('end_date', '<=', now()->addDays(7))->count() }}
Expired
{{ $offers->where('end_date', '<', now())->count() }}
| Offer Details | Type | Discount | Valid Period | Status | Actions |
|---|---|---|---|---|---|
|
{{ $offer->title }}
{{ Str::limit($offer->description, 40) }}
@if($offer->product)
Product: {{ $offer->product->name }}
@elseif($offer->category)
Category: {{ $offer->category->name }}
@elseif($offer->vendor)
Vendor: {{ $offer->vendor->store_name }}
@else
Global Offer
@endif
|
{{ ucfirst($offer->discount_type) }} | {{ $offer->discount_value }} {{ $offer->discount_type === 'percentage' ? '%' : '$' }} |
{{ $offer->start_date ? $offer->start_date->format('M d, Y') : 'N/A' }}
to {{ $offer->end_date ? $offer->end_date->format('M d, Y') : 'No expiry' }}
|
{{ $offer->is_active ? 'Active' : 'Inactive' }} | |
{{ Str::limit($offer->description, 30) }}