@extends('layouts.admin') @section('title', 'User Details') @section('page-title', 'User: ' . $user->name) @section('content')
{{ strtoupper(substr($user->name, 0, 1)) }}

{{ $user->name }}

{{ $user->email }}

{{ $user->is_active ? 'Active' : 'Suspended' }}
Balance${{ number_format($user->balance, 2) }}
Total Earned${{ number_format($totalEarned, 2) }}
Referral Code{{ $user->referral_code }}
Joined{{ $user->created_at->format('M d, Y') }}
@if($user->activePlan)
Plan{{ $user->activePlan->plan->name }}
@endif

Adjust Balance

@csrf
@csrf

Recent Survey Completions

@forelse($completions as $c) @empty @endforelse
Survey Reward Date
{{ $c->survey->title ?? 'Deleted Survey' }} ${{ number_format($c->reward, 2) }} {{ $c->created_at->format('M d, Y') }}
No completions.

Recent Transactions

@forelse($payments as $p) @empty @endforelse
Type Amount Status Date
{{ ucfirst($p->type) }} ${{ number_format($p->amount, 2) }} {{ ucfirst($p->status) }} {{ $p->created_at->format('M d, Y') }}
No transactions.
@endsection