@extends('layouts.admin') @section('title', 'Device Details - ' . $device->name) @section('content')

Device Information

Status:
Type: {{ ucfirst($device->type) }}
Owner: {{ $device->user->name ?? 'N/A' }} ({{ $device->user->email ?? 'N/A' }})
API Key: {{ substr($device->api_key, 0, 20) }}...
Firmware: {{ $device->firmware_version ?? '1.0.0' }}
Created: {{ $device->created_at->format('d M Y H:i:s') }}
Last Heartbeat: {{ $device->last_heartbeat ? $device->last_heartbeat->format('d M Y H:i:s') : 'Never' }}

Device Statistics

Total Readings: {{ number_format($stats['total_data']) }}
Last 24 Hours: {{ number_format($stats['last_24h']) }}
Avg Intensity: {{ number_format($stats['avg_value']) }}
@if($device->capabilities)

Capabilities

@foreach($device->capabilities as $cap) {{ ucfirst($cap) }} @endforeach
@endif

Recent Data (Last 50 readings)

@forelse($recentData as $data) @empty @endforelse
Recorded At Data Type Value Raw Data
{{ $data->recorded_at->format('d/m/Y H:i:s') }} {{ $data->data_type }} @if(is_array($data->value))
{{ json_encode($data->value, JSON_PRETTY_PRINT) }}
@else {{ $data->value }} @endif
No data recorded yet
@endsection