@php use App\Models\Attendance; use Carbon\Carbon; $admin = auth()->guard('web')->id(); $today = Carbon::today(); $attendance = Attendance::where('user_id', $admin) ->whereDate('presence', $today) ->whereNull('absence') ->first(); @endphp
| Name | Presence | Presence | Avance | Absence Img | Total Hours | |||
|---|---|---|---|---|---|---|---|---|
| {{ $list->user_id ?? '-' }} | --}}{{ $list->user->name ?? '-' }} | {{--{{ $list->user_id ?? '-' }} | {{ $list->user->name ?? '-' }} | --}}
|
{{ $list->presence ? \Carbon\Carbon::parse($list->presence)->format('l h:i A') : 'No Presence Time' }} | {{ $list->absence ? \Carbon\Carbon::parse($list->absence)->format('l h:i A') : 'No Absence Time' }} |
|
@if ($list->total_work_minutes > 0) @php $hours = floor($list->total_work_minutes / 60); $minutes = $list->total_work_minutes % 60; @endphp @if ($list->total_work_minutes < 60) {{ $list->total_work_minutes }} Min @else {{ $hours }} {{ $hours == 1 ? 'Hour' : 'Hours' }} @if ($minutes > 0) {{ $minutes }} Min @endif @endif @else - @endif |
| Nothing in record | ||||||||