@extends('backend.layouts.master') {{-- Use your custom layout file --}} @section('content') @push('styles') @endpush
Student Details
Student Information

Name: {{ $student->first_name .' '. $student->last_name }}

Enrollment No: {{ $student->enrollment_no }}

Email: {{ $student->email }}

Phone: {{ $student->phone }}

Hostel Details
Hostel Name Building Floor Room Number Allocated At
{{ $student->hostel?->name ?? 'N/A' }} {{ $student->roomAllocation?->room?->building?->name ?? 'N/A' }} {{ $student->roomAllocation?->floor ?? 'N/A' }} {{ $student->roomAllocation?->room?->room_number ?? 'N/A' }} {{ $student->roomAllocation?->allocated_at ? \Carbon\Carbon::parse($student->roomAllocation->allocated_at)->format('d M Y') : 'N/A' }}
Mess Bills
@if($student->messBills->isNotEmpty()) @foreach ($student->messBills as $index => $messBill) @endforeach @else

No mess bills found.

@endif
# Month Days Amount (₹) Status Created At
{{ $index + 1 }} {{ \Carbon\Carbon::parse($messBill->month)->format('F Y') }} {{ $messBill->days }} {{ number_format($messBill->amount, 2) }} @if ($messBill->status === 'paid') Paid @elseif ($messBill->status === 'unpaid') Unpaid @else {{ ucfirst($messBill->status) }} @endif {{ \Carbon\Carbon::parse($messBill->created_at)->format('d M Y') }}
Disciplinary Violations/Fines
@if($student->violations->isNotEmpty()) @foreach ($student->violations as $index => $violation) @endforeach
# Date Type Status Fine Amount Review Notes
{{ $index + 1 }} {{ \Carbon\Carbon::parse($violation->violation_date)->format('d M Y') }} {{ $violation->violationType->name }} {{ ucfirst($violation->status) }} {{ ucfirst($violation->fine_amount) }} {{ ucfirst($violation->review_notes) }}
@else

No disciplinary violations recorded.

@endif
Attendance Details
Present

{{ $attendanceCalendar['attendanceCount'] }}

Leave

{{ $attendanceCalendar['leaveCount'] }}

Absent

{{ $attendanceCalendar['absentCount'] }}

@include('backend.partials.student_attendance_calendar', [ 'calendarData' => $attendanceCalendar['calendarData'], // <-- Only this sub-array 'firstDayOfMonth' => $attendanceCalendar['firstDayOfMonth'], 'year' => $attendanceCalendar['year'], 'month' => $attendanceCalendar['month'], ])
Mess Details
@php $totalBills = $student->messBills->count(); $paidBills = $student->messBills->where('status', 'paid')->count(); $unpaidBills = $student->messBills->where('status', 'unpaid')->count(); @endphp
Mess Fees Status

@if ($totalBills === 0) No Bills @elseif ($paidBills === $totalBills) Paid @elseif ($unpaidBills === $totalBills) Unpaid @else Partially Paid @endif

@include('backend.partials.student_attendance_calendar', [ 'calendarData' => $attendanceCalendar['calendarData'], // <-- Only this sub-array 'firstDayOfMonth' => $attendanceCalendar['firstDayOfMonth'], 'year' => $attendanceCalendar['year'], 'month' => $attendanceCalendar['month'], ])
@endsection