@php use Carbon\Carbon; @endphp
Center Code | Center Name | Student Code | Student Name | Attendance Date | In Time | Out Time | Duration |
---|---|---|---|---|---|---|---|
@if(isset($key->short_code)) {{$key->short_code}} @endif | @if(isset($key->center_name)) {{$key->center_name}} @endif | @if(isset($key->member_code)) {{ $key->member_code }} @endif | @if(isset($key->student_name)) {{$key->student_name}} @endif | @if(isset($key->punch_date)) {{ date('d-m-Y', strtotime($key->punch_date)) }} | @endif@if(isset($key->punch_in)) {{ date('H:i:s', strtotime($key->punch_in)) }} | @endif@if(isset($key->punch_out)) {{ date('H:i:s', strtotime($key->punch_out)) }} | @endif@if(date('H:i:s', strtotime($key->punch_in)) == date('H:i:s', strtotime($key->punch_out))) 2 @else @php $start = Carbon::parse($key->punch_in); $end = Carbon::parse($key->punch_out); $duration = $end->diffInMinutes($start); //$mins = $end->diff($start, true); @endphp {{--$mins->h}}:{{str_pad($mins->i, 2, "0", STR_PAD_LEFT) --}} {{number_format(($duration/60),2)}} @endif |