@extends('layouts.admin') @section('title', $user->name.' — User Profile') @section('page-title', 'User Profile') @section('content')
{{-- User Info Card --}}

{{ $user->name }}

{{ $user->phone }}

@if($user->email)

{{ $user->email }}

@endif
@if($user->trashed()) Deleted @elseif($user->is_banned) Banned — {{ $user->ban_reason }} @else Active @endif

Joined {{ $user->created_at->format('d M Y') }}

{{-- Balance --}}

Balances

Deposit Balance৳{{ number_format($user->balance, 2) }}
Winning Balance৳{{ number_format($user->winning, 2) }}
Total৳{{ number_format($user->balance + $user->winning, 2) }}
{{-- Stats --}}

Stats

{{ $user->total_matches }}

Matches

{{ $user->total_kills }}

Kills

{{ $user->total_wins }}

Wins

{{ $user->referral_code }}

Ref Code

{{-- Actions --}}
Edit User @if(!$user->is_banned) @else
@csrf
@endif
{{-- Right Column --}}
{{-- Recent Transactions --}}

Recent Transactions

@forelse($user->transactions as $txn) @empty @endforelse
Type Amount TRX ID Status Date
{{ str_replace('_',' ',$txn->type) }} ৳{{ number_format($txn->amount,2) }} {{ $txn->trx_id ?? '-' }} {{ ucfirst($txn->status) }} {{ $txn->created_at->format('d M Y') }}
No transactions.
{{-- Match History --}}

Match History

@forelse($user->registrations->take(10) as $reg)

{{ $reg->tournament->title ?? 'Deleted' }}

{{ $reg->player_name }} · {{ $reg->created_at->format('d M Y') }}

{{ $reg->kills }} kills · pos #{{ $reg->position ?? '-' }}

@if($reg->prize_won > 0)

৳{{ number_format($reg->prize_won) }}

@endif
@empty
No matches played.
@endforelse
{{-- Ban Modal --}} @endsection