@extends('admin.admin_dashboard') @section('customcss') @endsection @section('admin')
@if ($errors->any()) @endif @if (session('success')) @endif
Holiday List {{ $holidays->total() }} Total
@if ($holidays->count())
@foreach ($holidays as $key => $holiday) @endforeach
S.No Date Range Title Applies To Description Days Actions
{{ $key + 1 }} {{ $holiday->start_date->format('M d') }} @if($holiday->start_date->format('Y-m-d') !== $holiday->end_date->format('Y-m-d')) — {{ $holiday->end_date->format('M d, Y') }} @else , {{ $holiday->start_date->format('Y') }} @endif {{ $holiday->title }} @if ($holiday->applies_to === 'all') All @elseif ($holiday->applies_to === 'staff') Staff @else Students @endif {{ $holiday->description ? Str::limit($holiday->description, 30) : '-' }} @php $days = $holiday->start_date->diffInDays($holiday->end_date) + 1; @endphp {{ $days }} {{ $days === 1 ? 'day' : 'days' }}
@csrf @method('DELETE')

Showing {{ $holidays->count() }} of {{ $holidays->total() }} holidays

@if ($holidays->hasPages()) @endif
@else
No holidays found. Create one now
@endif
@endsection @section('customjs') @endsection