@extends('layouts.admin') @section('title', 'Active Subscriptions') @section('content')
{{-- Header --}}

Active Subscriptions

Currently active subscriptions with quick force-expire action.

Total Active: {{ $subscriptions->total() }}
{{-- Session Messages --}} @if(session('success'))
{{ session('success') }}
@endif @if(session('error'))
{{ session('error') }}
@endif {{-- Cards --}}
@forelse($subscriptions as $item)

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

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

Active
Plan
{{ $item->plan->name ?? 'N/A' }}
Validity
{{ $item->start_date ? $item->start_date->format('d M, Y') : 'N/A' }} - {{ $item->end_date ? $item->end_date->format('d M, Y') : 'N/A' }}
Remaining Days
{{ $item->end_date ? max(0, now()->diffInDays($item->end_date, false)) : 0 }} days
Type
@if($item->is_trial) Trial @else Paid @endif
@csrf @method('PATCH')
@empty
📭

No active subscriptions found

Active subscription records will appear here when available.

@endforelse
{{-- Pagination --}} @if($subscriptions->hasPages())
{{ $subscriptions->links() }}
@endif
@endsection @section('scripts') @endsection