@extends('layouts.admin') @section('title', 'Gestion des Codes Promo') @push('styles') @endpush @section('sub_header') @include('admin.partials.settings-tabs') @endsection @section('content')
{{-- Main Conteneur style Amazon Card --}}

Gestion des Codes Promo

Nouveau code promo Imprimer
{{-- Barre de filtre --}}
Afficher résultats par page
Rechercher :
{{-- Table Amazon Design --}} @forelse($coupons as $coupon) @empty @endforelse
Code & Catégorie Réduction Période Utilisation Statut Actions
{{ $coupon->code }}
@if($coupon->category) {{ $coupon->category->nom }} @else Partout sur le site @endif
{{ $coupon->type == 'percent' ? $coupon->value . '%' : number_format($coupon->value, 0, ',', ' ') . ' F' }} @if($coupon->min_purchase > 0)
Dès {{ number_format($coupon->min_purchase, 0, ',', ' ') }} F
@endif
@if($coupon->start_date || $coupon->end_date)
Du : {{ $coupon->start_date ? $coupon->start_date->format('d/m/Y') : '∞' }}
Au : {{ $coupon->end_date ? $coupon->end_date->format('d/m/Y') : '∞' }}
@else Illimité @endif
{{ $coupon->used_count }}
sur {{ $coupon->usage_limit ?? '∞' }}
@if($coupon->is_active) Actif @else Inactif @endif
Modifier |
@csrf @method('DELETE')
Aucun code promo trouvé.
{{-- Pagination Info & Links --}} @if($coupons->total() > 0)
Affichage de {{ $coupons->firstItem() ?? 0 }} à {{ $coupons->lastItem() ?? 0 }} sur {{ $coupons->total() }} résultats
@if($coupons->onFirstPage()) Précédent @else Précédent @endif @php $pStart = max(1, $coupons->currentPage() - 2); $pEnd = min($coupons->lastPage(), $pStart + 4); @endphp @for($i = $pStart; $i <= $pEnd; $i++) @if($i == $coupons->currentPage()) {{ $i }} @else {{ $i }} @endif @endfor @if($coupons->hasMorePages()) Suivant @else Suivant @endif
@endif
@endsection