@extends('layouts.admin') @section('title', 'Manage Devices') @section('content')
{{ $stats['total'] }}
Total Devices
{{ $stats['online'] }}
Online
{{ $stats['offline'] }}
Offline
{{ $stats['pending'] }}
Pending
Reset Export CSV
@forelse($devices as $device)
{{ $device->last_heartbeat ? $device->last_heartbeat->diffForHumans() : 'Never' }}
@empty @endforelse
Device ID Name Type Owner Status Last Heartbeat Actions
{{ $device->device_id }}
{{ $device->name }} @if($device->type == 'sensor') @elseif($device->type == 'gateway') @else @endif {{ ucfirst($device->type) }}
{{ substr($device->user->name ?? 'N/A', 0, 2) }}
{{ $device->user->name ?? 'N/A' }}
{{ ucfirst($device->status) }}

No devices found

@endsection