@extends('superadmin.layouts.app') @section('title', 'User Details') @section('content')

User Details

@if($user->profile_picture_url) User profile picture @else
@endif

{{ $user->name }}

@if($user->role == 'super_admin') Super Admin @elseif($user->role == 'admin') Admin @else User @endif @if($user->banned_at) Banned @else Active @endif

  • Email {{ $user->email }}
  • Username {{ $user->username }}
  • Shortlinks {{ number_format($userStats['total_shortlinks']) }}
  • Total Clicks {{ number_format($userStats['total_clicks']) }}
  • Joined {{ $user->created_at->format('M d, Y') }}
@if($user->role !== 'super_admin') @if($user->banned_at)
@csrf
@else
@csrf
@endif @else @endif

Additional Information

@if($user->phone) @endif @if($user->google_id) @endif
User ID: {{ $user->id }}
Phone: {{ $user->phone }}
Google ID: {{ $user->google_id }}
Email Verified: @if($user->email_verified_at) Yes {{ $user->email_verified_at->format('M d, Y') }} @else No @endif
Last Updated: {{ $user->updated_at->format('M d, Y H:i') }}

{{ number_format($userStats['total_shortlinks']) }}

Total Shortlinks

{{ number_format($userStats['active_shortlinks']) }}

Active Links

{{ number_format($userStats['total_clicks']) }}

Total Clicks

{{ $userStats['total_clicks'] > 0 ? number_format($userStats['total_clicks'] / max($userStats['total_shortlinks'], 1), 1) : '0' }}

Avg Clicks/Link

@if($clicksByMonth->count() > 0)

Click Activity (Last 12 Months)

@endif

Recent Shortlinks

@if($userStats['recent_activity']->count() > 0)
@foreach($userStats['recent_activity'] as $shortlink) @endforeach
ID Original URL Custom Label Clicks Status Created
{{ $shortlink->id }} {{ $shortlink->original }} {{ $shortlink->custom_label ?: '-' }} {{ number_format($shortlink->clicks) }} @if($shortlink->is_active) Active @else Inactive @endif {{ $shortlink->created_at->format('M d, Y') }}
@else
No shortlinks found

This user hasn't created any shortlinks yet.

@endif
@endsection @push('scripts') @if($clicksByMonth->count() > 0) @endif @endpush