@extends('layouts.admin-modern') @section('title', 'Gestion Abonnements') @section('content')
{{-- En-tête --}}

⭐ Gestion des Abonnements

Gérez les plans et les abonnés

{{-- Statistiques --}}

Revenus abonnements

{{ number_format($monthlyRevenue ?? 0, 2) }} €

ce mois

Abonnés actifs

{{ $activeSubscribers ?? 0 }}

Plans actifs

{{ $activePlans ?? 0 }}

Taux conversion

{{ $conversionRate ?? 0 }}%

{{-- Plans d'abonnement --}}

Plans d'abonnement

@forelse($plans ?? [] as $plan) @empty

Aucun plan configuré

@endforelse
{{-- Liste des abonnés --}}

Abonnés

@if(isset($subscriptions) && $subscriptions->count() > 0)
@foreach($subscriptions as $subscription) @endforeach
Utilisateur Type Plan Début Fin Statut Actions
{{ substr($subscription->user->name ?? 'U', 0, 1) }}

{{ $subscription->user->name ?? 'N/A' }}

{{ $subscription->user->email ?? 'N/A' }}

{{ ucfirst($subscription->user->role ?? 'N/A') }} {{ $subscription->plan->name ?? 'N/A' }} {{ $subscription->started_at?->format('d/m/Y') ?? $subscription->starts_at?->format('d/m/Y') ?? 'N/A' }} {{ $subscription->current_period_end?->format('d/m/Y') ?? $subscription->ends_at?->format('d/m/Y') ?? 'N/A' }} @php $statusClasses = [ 'active' => 'bg-green-100 text-green-800', 'cancelled' => 'bg-red-100 text-red-800', 'expired' => 'bg-gray-100 text-gray-800', 'paused' => 'bg-yellow-100 text-yellow-800', ]; @endphp {{ ucfirst($subscription->status) }}
@if($subscription->status !== 'active')
@csrf
@else
@csrf
@endif @if($subscription->user) @endif
@if($subscriptions->hasPages())
{{ $subscriptions->links() }}
@endif @else

Aucun abonné

Les abonnements apparaîtront ici.

@endif
{{-- Modal Nouveau Plan --}} {{-- Modal Prolonger Abonnement --}} @push('scripts') @endpush @endsection