@extends('layouts.user') @section('content') @php $user = auth()->user(); $activeSub = $user->subscriptions->where('status', 'active')->sortByDesc('expires_at')->first(); $apiKeys = $user->apiKeys; $activeKeysCount = $apiKeys->where('status', 'active')->count(); /* ── Human-readable time helper ── */ if (!function_exists('humanTime')) { function humanTime(int $days): string { if ($days <= 0) return 'Expired'; if ($days === 1) return '1 day left'; if ($days < 7) return $days . ' days left'; if ($days < 14) return '1 week left'; if ($days < 30) return round($days / 7) . ' weeks left'; if ($days < 60) return '1 month left'; if ($days < 365) return round($days / 30) . ' months left'; return round($days / 365, 1) . ' years left'; } } /* ── Expiring soon calculation ── */ $expiringSoon = false; $daysLeft = null; if ($activeSub) { $daysLeft = (int) now()->diffInDays($activeSub->expires_at, false); $expiringSoon = $daysLeft >= 0 && $daysLeft <= 7; } @endphp {{-- PAGE HEADER --}}
Tab Hider Secure API Integration
Your key will expire in {{ humanTime($daysLeft) }} on {{ $activeSub->expires_at->format('d M Y') }}. Please renew to ensure uninterrupted panic-defense protection.
Active keys authenticate your browser extension requests.
| Key | Subscription | Status | Expires | Time Left | Actions |
|---|---|---|---|---|---|
{{ $key->key }}
|
{{-- Plan --}}
{{ $sub ? $sub->plan_type . ' Premium' : 'N/A' }} | {{-- Key Status --}}@if($isExpired) Expired @elseif($key->status == 'active') Active @else Disabled @endif | {{-- Expiry Date --}}@if($expiresAt) {{ $expiresAt->format('d M Y') }} @else — @endif | {{-- Days Left --}}@if($daysLeft !== null) @if($isExpired) Expired @elseif($expiringSoon) {{ humanTime($daysLeft) }} @else {{ humanTime($daysLeft) }} @endif @else — @endif | {{-- Actions --}}
@if(!$isExpired)
@else
Renew Plan
@endif
|
Integration Guide
Follow these steps to activate premium defense features on your Tab Hider Chrome Extension:
Copy one of your active API keys from the left panel.
Click the Tab Hider icon in your browser's extension toolbar.
Navigate to the Settings panel and find the premium activation field.
Paste the key and hit Activate. Enjoy premium protection instantly.
Included