@extends('admin.layout') @section('title', 'User: ' . ($user->battle_name ?? $user->name)) @section('content')
← Back to users
Edit @if ($user->is_banned)
@csrf
@else
@csrf
@endif
@csrf

Profile

Battle Name
{{ $user->battle_name }}
Name
{{ $user->name }}
Email
{{ $user->email }}
Favorite Category
{{ $user->favorite_category ?? '—' }}
Joined
{{ $user->created_at->format('M j, Y') }}
Last Played
{{ $user->last_played_at?->format('M j, Y') ?? 'Never' }}
@if ($user->is_banned)
Banned
{{ $user->banned_reason ?: 'No reason' }}
{{ $user->banned_at?->diffForHumans() }}
@endif

Stats

Level
{{ $user->level }}
XP
{{ number_format($user->xp) }}
Coins
{{ number_format($user->coins) }}
Energy
{{ $user->energy }}
Games
{{ $user->games_played }}
Won
{{ $user->games_won }}
Streak
{{ $user->streak }}
Best
{{ $user->best_streak }}

Grant Coins

@csrf

Recent Quiz Sessions ({{ $user->quiz_sessions_count }})

@forelse ($recentSessions as $s)
{{ $s->category->label ?? '—' }}
{{ $s->mode }} · {{ $s->created_at->format('M j, Y g:ia') }}
{{ $s->correct_answers }}/{{ $s->total_questions }}
{{ ucfirst($s->status) }} · {{ $s->grade ?: '—' }}
@empty
No sessions yet.
@endforelse

Recent Battles ({{ $user->challenger_battles_count }})

@forelse ($recentBattles as $b)
vs {{ $b->is_bot_match ? $b->bot_name : ($b->opponent->battle_name ?? '—') }}
{{ $b->category->label ?? '—' }} · {{ $b->created_at->format('M j, Y') }}
{{ $b->challenger_score }} – {{ $b->opponent_score }}
{{ ucfirst($b->status) }}
@empty
No battles yet.
@endforelse

Achievements ({{ $user->achievements_count }})

@forelse ($achievements as $a) 🏆 {{ $a->title }} @empty
No achievements unlocked yet.
@endforelse
@endsection