@extends('admin.layouts.app') @section('title', 'Offers Management') @section('content')

Offers Management

Manage discount offers and promotions

Add New Offer

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() }}

All Offers

@forelse($offers as $offer) @empty @endforelse
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' }}
@csrf @method('PATCH')
{{ $offer->is_active ? 'Active' : 'Inactive' }}
@csrf @method('DELETE')

No offers found

Get started by creating your first discount offer.

Create Offer
@if($offers->hasPages())
{{ $offers->appends(request()->query())->links() }}
@endif
@endsection