Platform Coupons

Registration codes that grant extended trial periods to new gym owners.

{{-- Create form --}} {{-- Table --}}
@if(empty($coupons['data']))

No platform coupons yet. Create one to get started.

@else
@foreach($coupons['data'] as $c) @php $now = now(); if (!($c['is_active'] ?? false)) { $badge = 'bg-gray-100 text-gray-500'; $badgeLabel = 'Inactive'; } elseif (($c['valid_from'] ?? null) && $now->lt(\Carbon\Carbon::parse($c['valid_from']))) { $badge = 'bg-blue-100 text-blue-600'; $badgeLabel = 'Scheduled'; } elseif (($c['valid_until'] ?? null) && $now->gt(\Carbon\Carbon::parse($c['valid_until']))) { $badge = 'bg-red-100 text-red-600'; $badgeLabel = 'Expired'; } elseif (($c['usage_limit'] ?? null) && ($c['used_count'] ?? 0) >= $c['usage_limit']) { $badge = 'bg-yellow-100 text-yellow-700'; $badgeLabel = 'Used up'; } else { $badge = 'bg-green-100 text-green-700'; $badgeLabel = 'Active'; } @endphp {{-- Edit row --}} @endforeach
Code Trial Days Usage Validity Status
{{ $c['code'] }} @if($c['description'] ?? null)

{{ $c['description'] }}

@endif
{{ $c['trial_days'] }} days {{ $c['used_count'] ?? 0 }} / {{ $c['usage_limit'] ?? '∞' }} @if(($c['valid_from'] ?? null) || ($c['valid_until'] ?? null)) {{ $c['valid_from'] ?? '–' }} → {{ $c['valid_until'] ?? '∞' }} @else No expiry @endif {{ $badgeLabel }}
@csrf @method('PATCH')
@csrf @method('DELETE')
@csrf @method('PATCH')
@endif
{{-- Pagination --}} @if(!empty($coupons['links']))
@foreach($coupons['links'] as $link) @if($link['url']) {!! $link['label'] !!} @else {!! $link['label'] !!} @endif @endforeach
@endif
@if($errors->any()) @endif