@extends('Admin.layout') @section('content') @php // Working days can be stored as JSON or an array $workingDays = is_array($attendanceMaster->working_days) ? $attendanceMaster->working_days : json_decode($attendanceMaster->working_days, true); $workingDays = $workingDays ?? []; $startTime = $attendanceMaster->start_time ? \Carbon\Carbon::parse($attendanceMaster->start_time)->format('H:i') : ''; $endTime = $attendanceMaster->end_time ? \Carbon\Carbon::parse($attendanceMaster->end_time)->format('H:i') : ''; $kmOn = old('km_allowance_enabled', $attendanceMaster->km_allowance_enabled); $leaveOn = old('paid_leave_enabled', $attendanceMaster->paid_leave_enabled); @endphp