@extends('backend.layouts.master') @section('content') @php use Illuminate\Support\Str; @endphp
| # | Student | From | To | Reason | Status | Remarks | @role('Admin|Hostel Warden')Document | Actions | @endrole|
|---|---|---|---|---|---|---|---|---|---|
| {{ $loop->iteration }} | {{ $leave->student->user->name ?? '-' }} | {{ $leave->from_date }} | {{ $leave->to_date }} | {{ $leave->reason }} | @if($leave->status === 'Pending') Pending @elseif($leave->status === 'Approved') Approved @else Rejected @endif | {{-- Remarks Column with Show More / Show Less --}}
@php
$remarks = $leave->remarks ?? '-';
$shortRemarks = Str::limit($remarks, 80);
@endphp
{{ $shortRemarks }}
{{ $remarks }}
@if(strlen($remarks) > 80)
Show More @endif |
@hasanyrole('Admin|Hostel Warden')
@if($leave->document) Download @else No File @endif |
@if($leave->status === 'Pending')
|
@endhasanyrole
|
| No leave records found. | |||||||||