@extends('layouts.admin') @section('title', 'Admin Dashboard') @section('content')
{{ number_format($stats['total_users'] ?? 0) }}
Total Users
{{ number_format($stats['total_devices'] ?? 0) }}
Total Devices
{{ number_format($stats['total_gempa'] ?? 0) }}
Earthquake Events
{{ number_format($stats['active_sensors'] ?? 0) }}
Active Sensors

Earthquake Trend (6 Months)

Recent Earthquakes

View All →
@forelse(($stats['recent_gempa'] ?? []) as $gempa) @empty @endforelse
Time Location Magnitude Device
{{ $gempa->waktu_kejadian ? $gempa->waktu_kejadian->format('d/m/Y H:i') : '-' }}
{{ $gempa->lokasi ?? '-' }}
{{ number_format($gempa->magnitude ?? 0, 1) }} {{ $gempa->sensor->name ?? '-' }}
No earthquake data

New Users

View All →
@forelse(($stats['recent_users'] ?? []) as $user) @empty @endforelse
User Email Joined Status
{{ substr($user->name ?? 'U', 0, 2) }}
{{ $user->name ?? '-' }}
{{ $user->email ?? '-' }} {{ $user->created_at ? $user->created_at->diffForHumans() : '-' }} Active
No users

Welcome, {{ auth()->user()->name }}!

Your dashboard is ready. As you add devices and collect earthquake data, statistics will appear here.

@endsection