@php $fmt = fn ($v) => '$'.number_format((float) $v, 2); $chip = [ 'trial' => 'bg-blue-500/15 text-blue-400', 'active' => 'bg-green-500/15 text-green-400', 'renewing' => 'bg-brand/15 text-brand-500', 'grace' => 'bg-amber-500/15 text-amber-400', 'suspended' => 'bg-yellow-500/15 text-yellow-400', 'expired' => 'bg-slate-500/15 text-slate-400', 'cancelled' => 'bg-red-500/15 text-red-400', 'deleted' => 'bg-slate-600/20 text-slate-500', 'past_due' => 'bg-amber-500/15 text-amber-400', ]; @endphp
@forelse ($subscriptions as $s) @empty @endforelse
Customer Plan Cycle Status Renews / Ends Actions
{{ $s->user?->name ?? '—' }}
{{ $s->user?->email }}
{{ $s->plan?->name ?? '—' }} {{ $fmt($s->amount) }} {{ ucfirst($s->billing_cycle) }} {{ $s->status }} @if ($s->onGrace())
{{ $s->graceRemainingDays() }}d grace
@endif
@php($end = $s->accessEndsAt()) {{ $end ? $end->format('M j, Y') : 'Lifetime' }} @if ($end && $s->remainingDays() !== null)
{{ $s->remainingDays() }} days left
@endif
@if ($s->status === 'suspended') @else @endif
No subscriptions found.
{{ $subscriptions->links('pagination.dark') }}
{{-- Extend modal --}} @if ($extendingId)

Extend Subscription

@error('extendDays')

{{ $message }}

@enderror
@foreach ([7, 14, 30, 90] as $d)@endforeach
@endif {{-- Change plan modal --}} @if ($changingId)

Change Plan

@error('newPlanId')

{{ $message }}

@enderror
@endif