@php $user = auth()->user(); $hasSubscription = isset($currentSubscription) && $currentSubscription; $daysRemaining = $hasSubscription ? now()->startOfDay()->diffInDays( \Carbon\Carbon::parse($currentSubscription->end_date)->startOfDay(), false ) + 1 : 0; @endphp
{{-- ========================================================= HERO ========================================================== --}}
{{ strtoupper(substr($user->name, 0, 1)) }}
Student Dashboard

Welcome back, {{ $user->name }} 👋

Track your exams, subscription and performance from one place.

SmartCBT Student
{{-- ========================================================= QUICK STATISTICS ========================================================== --}}
Exam Access

{{ $hasSubscription ? 'Premium Access' : 'Limited Access' }}

{{ $hasSubscription ? 'Your subscription is currently active.' : 'Subscribe to unlock premium examinations.' }}
Subscription
@if($hasSubscription)

Active

{{ $currentSubscription->subscriptionPlan->name }} @else

Inactive

No active subscription @endif
My Results

View Performance

Review your previous examination results.
{{-- ========================================================= MAIN CONTENT ========================================================== --}}
{{-- LEFT --}}
{{-- Subscription --}} @if($hasSubscription)
CURRENT SUBSCRIPTION

{{ $currentSubscription->subscriptionPlan->name }}

Your premium CBT access is active.

Active
Started
{{ \Carbon\Carbon::parse($currentSubscription->start_date)->format('d M Y') }}
Expires
{{ \Carbon\Carbon::parse($currentSubscription->end_date)->format('d M Y') }}
Remaining
{{ $daysRemaining }} {{ $daysRemaining === 1 ? 'day' : 'days' }}
Subscription status Active
@else
SUBSCRIPTION

Unlock Premium CBT Access

Subscribe to access premium examinations and continue your CBT preparation.

View Subscription Plans
@endif {{-- Quick Actions --}}
{{-- RIGHT --}}
Account Overview

Your SmartCBT account information.

Student
{{ $user->name }}
Email
{{ $user->email }}
Account Status
Verified Student
Your subscription status is checked automatically from your account. Once a subscription expires, your dashboard will reflect the change.
{{-- ========================================================= FOOTER MESSAGE ========================================================== --}}
SmartCBT — Keep learning, keep improving.