@extends('layouts.app') @section('center')
@foreach($data as $k =>$row) @php $color = "success"; $state = "On"; $ctime = new DateTime(); // Current date and time $dtime = new DateTime($row->db_datetime); // Specific DateTime $interval = $ctime->diff($dtime); $minutes = ($interval->days * 24 * 60) + ($interval->h * 60) + $interval->i; if($row->auxr_status==1) { if($minutes>=5) { $color = "info"; $state = "Offline"; } } else { $color = "danger"; $state = "Off"; } @endphp
{{$row->kva}} KVA {{-- {{$state}} --}}
{{--
Status : {{$state}}
--}}

{{$row->datetime}}

{{-- >MSN: {{$row->msn}} --}} @if($row->auxr_status==1) @else @endif {{-- --}}
Device ID: {{$row->global_device_id}}
Switch Status: OnSwitch Status: Off
Current 1: {{$row->current_phase_a}}
Current 2: {{$row->current_phase_b}}
Current 3: {{$row->current_phase_c}}
Voltage 1: {{$row->voltage_phase_a}}
Voltage 2: {{$row->voltage_phase_b}}
Voltage 3: {{$row->voltage_phase_c}}
Average Power Factor: {{$row->average_pf}}
Power Factor 1: {{$row->pf1}}
Power Factor 2: {{$row->pf1}}
Power Factor 3: {{$row->pf1}}
Real Time Logs @if($row->is_aux_relay==1) @if($row->auxr_status==1) Switch Off @else Switch On @endif @endif
@endforeach
@push('scripts') @endpush @endsection()