@extends('layouts.admin') @section('title', 'User Analytics') @section('content') @push('styles') @endpush

User Analytics Dashboard

Export CSV
Active Users (7d)

{{ $activeUsers7 }}

Active Users (30d)

{{ $activeUsers30 }}

Login Activity Trend
Last 30 Days
Device Usage Statistics
Top IP Addresses
@foreach($ipStats as $ip) @endforeach
Network IP Activity Sessions
{{ $ip->ip }}
{{ $ip->count }}
Recent Activity Logs
View All
{{-- Changed from Platform --}} @foreach($recentLogs as $log) @php $ua = $log->user_agent ?? ''; $isMobile = preg_match('/(android|iphone|ipad)/i', $ua); $deviceIcon = $isMobile ? 'bi-phone' : 'bi-pc-display'; @endphp @endforeach
User Details Action Type DeviceOccurred
{{ $log->user->name ?? 'Unknown' }}
{{ $log->user->email ?? '' }}
{{ ucfirst($log->action) }} @if($log->module) {{ $log->module }} @endif
{{ Str::limit($ua, 25) }}
IP: {{ $log->ip_address ?? 'N/A' }}
{{ $log->timestamp->diffForHumans() }}
@endsection @push('scripts') @endpush