@extends('layouts.app') @section('title', 'Connections') @section('content')
Total Connections: {{ count($records) }}
Total Duration: {{ floor($totalDurationCarbon->totalHours) }}h {{ $totalDurationCarbon->minutes }}m {{ $totalDurationCarbon->seconds }}s
{{-- 検索フォーム --}} {{-- 並び替え用ヘルパ --}} @php function sortIcon($field, $currentSort, $direction) { if ($field !== $currentSort) { return ''; } return $direction === 'asc' ? '↑' : '↓'; } function sortUrl($field) { $dir = request('sort_by') === $field && request('direction') === 'asc' ? 'desc' : 'asc'; return request()->fullUrlWithQuery(['sort_by' => $field, 'direction' => $dir]); } @endphpComputer Name {{ sortIcon('devicename', $sortBy, $direction) }} | ID {{ sortIcon('deviceid', $sortBy, $direction) }} | Start Date {{ sortIcon('start_date', $sortBy, $direction) }} | Duration {{ sortIcon('duration_minutes', $sortBy, $direction) }} | Group Name {{ sortIcon('groupname', $sortBy, $direction) }} |
---|---|---|---|---|
{{ $record['devicename'] ?? 'Unknown' }} | {{ $record['deviceid'] ?? 'Unknown' }} | {{ isset($record['start_date']) ? \Carbon\Carbon::parse($record['start_date'])->setTimezone('Australia/Sydney')->format('M j, Y g:i A') : '-' }} | {{ isset($record['duration_minutes']) ? floor($record['duration_minutes']) . ' min' : '-' }} | {{ $record['groupname'] ?? 'Unknown' }} |