إدارة الكوبونات

إدارة الكوبونات

إدارة وتحكم في كوبونات الخصم المتاحة للمستخدمين

إضافة كوبون جديد
@if(session('success'))
{{ session('success') }}
@endif
{{ $coupons->total() }}
إجمالي الكوبونات
{{ $coupons->where('active', true)->count() }}
كوبونات مفعلة
{{ $coupons->sum('used_count') }}
إجمالي الاستخدامات
{{ $coupons->where('expires_at', '<', now())->count() }}
كوبونات منتهية الصلاحية

قائمة الكوبونات المتاحة

@if($coupons->count() > 0) @foreach($coupons as $coupon) @endforeach
الكود النوع القيمة الحد الأقصى المستخدم تاريخ الانتهاء الحالة إجراءات
{{ $coupon->code }}
@if($coupon->description)
{{ Str::limit($coupon->description, 30) }}
@endif
@if($coupon->type == 'percent') نسبة مئوية @else مبلغ ثابت @endif
@if($coupon->type == 'percent') {{ $coupon->value }}% @else ${{ $coupon->value }} @endif
@if($coupon->usage_limit)
{{ $coupon->usage_limit }}
@else غير محدود @endif
{{ $coupon->used_count }} @if($coupon->usage_limit)
@endif
@if($coupon->expires_at)
{{ $coupon->expires_at->format('Y/m/d') }}
{{ $coupon->expires_at->diffForHumans() }}
@else بدون انتهاء @endif
@php $isExpired = $coupon->expires_at && $coupon->expires_at->isPast(); $isUsedUp = $coupon->usage_limit && $coupon->used_count >= $coupon->usage_limit; @endphp @if(!$coupon->active) معطل @elseif($isExpired) منتهي الصلاحية @elseif($isUsedUp) مستنفد @else مفعل @endif
@csrf @method('DELETE')
@else

لا توجد كوبونات مضافة بعد

ابدأ بإنشاء كوبون جديد لتوفير خصومات للمستخدمين

إنشاء كوبون جديد
@endif
@if($coupons->hasPages())
{{ $coupons->links() }}
@endif