{{-- Shared Leave Request form fields. Wrapped by create.blade.php and edit.blade.php. Expects: $item (null on create), $users, $leaveTypes, $statuses. --}} @php $app = $item ?? null; $fromDate = old('from_date', $app && $app->from_date ? $app->from_date->format('Y-m-d') : ''); $toDate = old('to_date', $app && $app->to_date ? $app->to_date->format('Y-m-d') : ''); @endphp