@if (checkAPI())
Total Online: {{ $count }}
@php $clientCount = 0; @endphp @foreach ($allMikrotikAndActiveUsers as $mikrotikAndActiveUsers) @foreach ($mikrotikAndActiveUsers['activeUsers'] as $client) @endforeach @endforeach
User ID Client IP NAS IP MAC Address Uptime
{{ $client['name'] }} {{ $client['address'] }} {{ $mikrotikAndActiveUsers['nasIp'] }} {{ $client['caller-id'] }} {{ $client['uptime'] }} {{-- @php $clientCount++; // Extract the initial uptime in seconds, considering days (e.g., "1d12h5m46s") preg_match('/(\d+)d(\d+)h(\d+)m(\d+)s/', $client['uptime'], $matches); $days = $matches[1] ?? 0; $hours = $matches[2] ?? 0; $minutes = $matches[3] ?? 0; $seconds = $matches[4] ?? 0; // Calculate total seconds $totalSeconds = ($days * 86400) + ($hours * 3600) + ($minutes * 60) + $seconds; @endphp
--}}
View live Traffice @can('onlineUserDisconnection') Disconnect @endcan
{{-- {{ $list->links() }} --}}
@else
Total Online: {{ $list->count() }}
{{-- @can('discount-online-all') @if ($list->count() > 0) Disconnect All @endif @endcan --}}
@if (checkSettings('client_name_in_online_list') == 'enable') @endif @foreach ($list as $r) @if (checkSettings('client_name_in_online_list') == 'enable') @endif @endforeach
User ID Name Client IP NAS IP MAC Address Last Update Uptime Date Action
{{ $r->username }} {{ $r->clients_name ?? '' }} {{ $r->framedipaddress }} {{ $r->nasipaddress }} {{ $r->callingstationid }} {{ $r->acctupdatetime }} {{ \Carbon\Carbon::parse($r->acctstarttime)->diffForHumans() }} {{ $r->acctstarttime }} @if (checkSettings('show-traffice') == 'enable') View live Traffice @endif @can('onlineUserDisconnection') Disconnect @endcan
@can('discount-online-all') @if ($list->count() > 0) Disconnect All @endif @endcan {{-- {{ $list->links() }} --}}
@endif