@extends('admin.layout') @section('content')
@if($subject->image_url) {{ $subject->name }} @else
{{ substr($subject->name, 0, 1) }}
@endif

{{ $subject->name }}

{{ $subject->code }}Created {{ $subject->created_at->format('M j, Y') }}

Back Edit
@csrf @method('PATCH')
@csrf @method('DELETE')

Total Tests

{{ $stats['total_tests'] }}

Total Registrations

{{ $stats['total_registrations'] }}

Active Registrations

{{ $stats['active_registrations'] }}

Avg Test Score

{{ number_format($stats['average_test_score'] ?? 0, 1) }}

Subject Information

{{ $subject->name }}

{{ $subject->code }}

{{ $subject->description }}

{{ $subject->is_active ? 'Active' : 'Inactive' }}

{{ $subject->created_at->format('M j, Y') }}

@if($subject->image_url)
{{ $subject->name }}
@endif @if($subject->color)
{{ $subject->color }}
@endif
@if($subject->tests->count() > 0)

Tests ({{ $subject->tests->count() }})

@foreach($subject->tests->take(5) as $test)

{{ $test->title }}

Level: {{ $test->competitionLevel->name ?? 'N/A' }} • Questions: {{ $test->questions_count ?? $test->questions->count() }} • Time: {{ $test->time_limit }}min

{{ $test->is_active ? 'Active' : 'Inactive' }}
@endforeach @if($subject->tests->count() > 5) @endif
@endif

Recent Registrations

@if($subject->subjectRegistrations->count() > 0)
@foreach($subject->subjectRegistrations->take(5) as $registration)

{{ $registration->user->full_name }}

{{ ucfirst($registration->payment_status) }} {{ $registration->registered_at->format('M j') }}
@endforeach
@else

No registrations yet

@endif
@if($subject->qualificationThresholds->count() > 0)

Qualification Thresholds

@foreach($subject->qualificationThresholds as $threshold)

Level {{ $threshold->competitionLevel->level ?? 'N/A' }}

Type: {{ $threshold->threshold_type }} • Value: {{ $threshold->threshold_value }}

@endforeach
@endif
@endsection