@extends('layouts.app') @section('center') @php use Carbon\Carbon; $totalPoles = count($data); $totalConnections = $data->sum('total_connections'); $totalSending = $data->sum('sending_connections'); $totalNotSending = $data->sum('not_sending_connections'); @endphp

Pole Wise Connection Sending Data Count

Total Poles

{{ $totalPoles }}

Total Connections

{{ $totalConnections }}

Sending Data

{{ $totalSending }}

Not Sending

{{ $totalNotSending }}

Reset
@forelse($data as $index => $row) @php $total = (int) ($row->total_connections ?? 0); $sending = (int) ($row->sending_connections ?? 0); $notSending = (int) ($row->not_sending_connections ?? 0); $percentage = $total > 0 ? round(($sending / $total) * 100, 1) : 0; if ($sending == $total && $total > 0) { $status = 'All Sending'; $statusClass = 'bg-online'; } elseif ($sending > 0) { $status = 'Partial Sending'; $statusClass = 'bg-partial'; } else { $status = 'Not Sending'; $statusClass = 'bg-offline'; } if (!empty($row->last_connection_update)) { $lastUpdate = Carbon::parse($row->last_connection_update); $lastPulse = $lastUpdate->format('d M Y, h:i A'); $age = $lastUpdate->diffForHumans(); } else { $lastPulse = 'Never'; $age = 'Never'; } @endphp @empty @endforelse
# Pole Device ID Total Connections Sending Data Not Sending Sending % Last Connection Update Status Connected
{{ $index + 1 }} {{ $row->pole_device_id }} {{ $total }} {{ $sending }} {{ $notSending }}
{{ $percentage }}%
{{ $lastPulse }}
{{ $age }}
{{ $status }} View
No connection devices found.
@endsection