@php function formatDateToKey($date) { return $date->format('j-F'); } @endphp
Attendance Sheet{{ date('d-m-Y', strtotime($employees[0]->date_from)) }} - {{ date('d-m-Y', strtotime($employees[0]->date_to)) }} |
@php
// Get the file path
$imagePath = public_path('storage/settings/companylogo/' . getcompanylogo());
// Check if the file exists
if (file_exists($imagePath)) {
// Read the image file
$imageContent = file_get_contents($imagePath);
// Encode image content to base64
$base64Image = 'data:image/png;base64,' . base64_encode($imageContent);
} else {
// Set base64Image to empty string if file doesn't exist
$base64Image = '';
}
@endphp
@if ($base64Image)
No image found @endif |
|---|---|
| AL = Annual | MC = Medical | MT = Maternity | MR = Marriage | CL = Compassionate | HL = Hospital | EX = Examination |
|---|---|---|---|---|---|---|
| PT = Paternity | AD = Advance | RL = Replacement | LS = Out Of Office | AB = Absent | NPL = NPL | EL = Emergency |
| ✓ = Present | = Restday | = Holiday |
|---|
| User ID | Name | Overtime | Short | Work | Leave | @php // date creation heading $sdatefrom = $employees[0]->date_from; $sdateto = $employees[0]->date_to; $dateRange = \Carbon\CarbonPeriod::create($sdatefrom, $sdateto); $dates = $dateRange->toArray(); for ($i = 0; $i < count($dateRange); $i++) { $alldate = $dates[$i]->format('d'); echo '' . $alldate . ' | '; } @endphp
|---|---|---|---|---|---|---|
| {{ $employee->employee_no }} | {{ $employee->personname }} | {{ $employee->overtime }} | {{ $employee->short }} | {{ $employee->workday }} | {{ $employee->leave }} | @php $startDay = explode('-', array_key_first(array_reverse(json_decode(json_encode($employee->att), true))))[0]; @endphp @foreach ($dates as $date)