@extends('layouts.app') @section('title', 'Leave History') @section('content')

Leave History

@if ($leaves->count() > 0)
@foreach ($leaves as $leave) @php $from = $leave->from_date; $to = $leave->to_date ?? $leave->from_date; @endphp @endforeach
Reason From To Days Document Status Applied Action
{{ Str::limit($leave->leave_reason, 20) }} {{ $from ? $from->format('d M') : '-' }} {{ $to ? $to->format('d M') : '-' }} {{ $leave->number_of_days }} @if($leave->attachment) 📄 Download @else - @endif {{ ucfirst($leave->status) }} {{ $leave->created_at?->format('d M') ?? '-' }} View
@if ($leaves->hasPages())
{{ $leaves->links() }}
@endif @else

No leave requests found.

Apply for leave now
@endif
@endsection