@extends('layouts.app') @section('title', 'Leave Requests') @section('page-title', 'Leave Requests') @section('content')
| Student | From | To | Reason | Status | @if(auth()->user()->isAdmin())Action | @endif
|---|---|---|---|---|---|
| {{ $leave->student->name ?? 'N/A' }} | {{ \Carbon\Carbon::parse($leave->from_date)->format('d M Y') }} | {{ \Carbon\Carbon::parse($leave->to_date)->format('d M Y') }} | {{ Str::limit($leave->reason, 50) }} | {{ ucfirst($leave->status) }} | @if(auth()->user()->isAdmin() && $leave->status === 'pending')@endif |
| No leave requests found. | |||||