@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 --}}
Back to Dashboard

Tab Hider Secure API Integration

My API Keys

@if($activeSub)
{{ $activeSub->plan_type }} Premium active
@else
No active premium subscription
@endif
{{-- Flash Messages --}} @if(session('success')) @endif @if(session('error')) @endif {{-- ══════════════════════════════════ EXPIRING SOON URGENT WARNING BANNER ══════════════════════════════════ --}} @if($activeSub && $expiringSoon) @endif
{{-- ── LEFT COLUMN: KEYS MANAGEMENT ── --}}
Authorized Keys

Active keys authenticate your browser extension requests.

@if($apiKeys->isEmpty())
🔑
No API Keys Yet

You need a premium subscription to generate and utilize API keys.

Upgrade Plan
@else
@foreach($apiKeys as $key) @php $sub = $key->subscription; $expiresAt = $sub ? $sub->expires_at : null; $daysLeft = $expiresAt ? (int) now()->diffInDays($expiresAt, false) : null; $isExpired = $expiresAt && now()->isAfter($expiresAt); $expiringSoon = !$isExpired && $daysLeft !== null && $daysLeft <= 7; @endphp {{-- Key --}} {{-- Plan --}} {{-- Key Status --}} {{-- Expiry Date --}} {{-- Days Left --}} {{-- Actions --}} @endforeach
Key Subscription Status Expires Time Left Actions
{{ $key->key }}
{{ $sub ? $sub->plan_type . ' Premium' : 'N/A' }} @if($isExpired) Expired @elseif($key->status == 'active') Active @else Disabled @endif @if($expiresAt) {{ $expiresAt->format('d M Y') }} @else @endif @if($daysLeft !== null) @if($isExpired) Expired @elseif($expiringSoon) {{ humanTime($daysLeft) }} @else {{ humanTime($daysLeft) }} @endif @else @endif
@if(!$isExpired)
@csrf
@csrf
@else Renew Plan @endif
@endif
{{-- ── RIGHT COLUMN: INTEGRATION & CONTENT PANEL ── --}}
{{-- How to Use / Integration Guide --}}

Integration Guide

How to Activate

Follow these steps to activate premium defense features on your Tab Hider Chrome Extension:

1

Copy one of your active API keys from the left panel.

2

Click the Tab Hider icon in your browser's extension toolbar.

3

Navigate to the Settings panel and find the premium activation field.

4

Paste the key and hit Activate. Enjoy premium protection instantly.

{{-- API Key Security Notice --}}
Security Best Practices
  • Never Share Keys: Treat API keys like passwords. Do not expose them in source code or public repositories.
  • Periodic Rotation: We advise rotating keys every 90 days to maintain secure, authenticated access.
  • Compromise Response: If a key is leaked, click the Rotate button immediately to invalidate the exposed key.
{{-- Extension Download / Premium features --}}

Included

Tab Hider Premium
Unlimited hidden tabs
Advanced keyboard panic triggers
Secure cloud backup & sync
Priority technical support
@if(!$activeSub) View Plans @endif
{{-- QUICK ACTIONS STRIP --}}

Back to Dashboard

View your account overview

Renew or Upgrade

Browse premium plans

@endsection