@extends('layout.index') @section('title', 'Employee Attendance') @section('content') @php use Carbon\Carbon; @endphp
@if ($message = Session::get('success'))
@endif
@csrf
@if (sizeof($aAttendance)) @php $i = 0; $i = $aAttendance->perPage() * ($aAttendance->currentPage() - 1); @endphp @foreach ($aAttendance as $val) @php $datetime1 = new DateTime(date('Y-m-d H:i:s', $val->inward_datetime)); $datetime2 = new DateTime(date('Y-m-d H:i:s', $val->outword_datetime)); if ($val->outword_datetime) { $difference = $datetime1->diff($datetime2); $difference = $difference->format('%H:%I'); } else { $difference = ''; } $i++; @endphp @endforeach @else @endif
Sr.No Date Pakage Status Supervisor Emp Code Emp Name Login Time Login Location Login Image Logout Time Logout Location Logout Image hours
{{ $i }} {{ date('d-m-Y', $val->attendance_date) }} {{ $val->Pakage_name }} {{ $val->success == 1 ? 'Present' : 'Absent' }} {{ $val->supervisor_name }} {{ $val->emp_id }} {{ $val->name }} {{ date('h:i A', $val->inward_datetime) }} {{ $val->in_location }} @if ($val->in_image_url) @else
No Image
@endif
{{ $val->outword_datetime ? date('h:i A', $val->outword_datetime) : "-" }} {{ $val->out_location ? $val->out_location : "-" }} @if ($val->out_image_url) @else
No Image
@endif
{{ $difference ? $difference : "-" }}
No Record Found.
{{ $aAttendance->links() }}
@endsection