@php $input = 'w-full rounded-xl border border-edge bg-ink px-3.5 py-2.5 text-sm text-slate-100 placeholder:text-slate-500 focus:border-brand focus:ring-2 focus:ring-brand/30'; $label = 'mb-1.5 block text-sm font-medium text-slate-300'; $roleLabel = ['super_admin' => 'Super Administrator', 'staff' => 'Staff', 'customer' => 'Customer'][$user->role] ?? $user->role; @endphp
{{-- Breadcrumb + header --}} {{-- ============ Profile banner ============ --}}
{{-- identity --}}
@if ($user->avatarUrl()) avatar @else {{ strtoupper(substr($user->name ?: $user->email, 0, 1)) }} @endif

{{ $user->name }}

{{ $roleLabel }}
{{ $user->email }}
Joined {{ $user->created_at->format('M j, Y') }} Last login {{ $user->last_login_at?->diffForHumans() ?? '—' }} @if ($user->location) {{ $user->location }} @endif
@error('avatar')

{{ $message }}

@enderror @if ($user->avatarUrl()) @endif
{{-- stat cards --}}
@php($cards = [ ['users', '#7c3aed', 'Total Users', number_format($kpis['total_users']), '+12.4%'], ['dollar-sign', '#3b82f6', 'Total Revenue', '$'.number_format($kpis['mrr']), '+18.2%'], ['send', '#22c55e', 'Total Posts', number_format($kpis['posts_today']), '+24.6%'], ['shield-check', '#f59e0b', 'User Role', $roleLabel, 'Full Access'], ]) @foreach ($cards as [$icon, $tint, $lbl, $val, $trend])
{{ $lbl }}
{{ $val }}
{{ $trend }}
@endforeach
{{-- ============ Main grid ============ --}}
{{-- LEFT --}}
{{-- Tabs --}}
@foreach (['personal' => 'Personal Information', 'preferences' => 'Preferences', 'notifications' => 'Notification Settings'] as $key => $lbl) @endforeach
{{-- Personal Information --}} @if ($tab === 'personal')
@error('name')

{{ $message }}

@enderror
@error('username')

{{ $message }}

@enderror
@error('email')

{{ $message }}

@enderror
@error('bio')

{{ $message }}

@enderror
@endif {{-- Preferences --}} @if ($tab === 'preferences')
@endif {{-- Notifications --}} @if ($tab === 'notifications')
@endif
{{-- Active Sessions --}}

Active Sessions

Devices currently signed in to your account.

@foreach ($sessions as $s) @endforeach
DeviceBrowser IPLast Active StatusAction
{{ $s['device'] }} · {{ $s['os'] }}
{{ $s['browser'] }} {{ $s['ip'] }} {{ $s['last_active'] }} {{ $s['current'] ? 'This device' : 'Active' }} @unless ($s['current']) @else — @endunless
{{-- RIGHT --}}
{{-- Security --}}

Security Information

Password
Two-Factor Authentication
API Tokens{{ $apiTokens }} active
Last Password Change{{ $user->last_password_changed_at?->format('M j, Y') ?? 'Never' }}
Login Notifications{{ ($notifications['security_alerts'] ?? false) ? 'Enabled' : 'Disabled' }}
Security Score{{ $securityScore }}%
{{-- Recent Activity --}}

Recent Activity

View All
@forelse ($activity as $log)
{{ $log->description ?? str_replace(['.', '_'], ' ', $log->action) }}
{{ $log->created_at->diffForHumans() }}
@empty
No recent activity.
@endforelse
{{-- Account Information --}}
Admin ID
#{{ $user->id }}
Role
{{ str_replace('_', ' ', $user->role) }}
Created
{{ $user->created_at->format('M j, Y') }}
Last Updated
{{ $user->updated_at->diffForHumans() }}
Account Status
{{ ucfirst($user->status) }}
Email Verified
{{ $user->email_verified_at ? 'Verified' : 'Pending' }}
{{-- ============ Password modal ============ --}} @if ($showPassword)

Change Password

@error('current_password')

{{ $message }}

@enderror
{{-- strength meter --}}

@error('password')

{{ $message }}

@enderror
@endif