{{ $reportData['college']->college_name }}

{{ $reportData['college']->affiliated_by }}

{{ $reportData['college']->address }}

Caste Wise Report

@php $serial = 1; // To keep track of S.No $total_bc_d = 0; // Total for BC-D $total_oc = 0; // Total for OC $total_sc = 0; // Total for SC $total_group = 0; // Total for Group Totals @endphp @foreach ($reportData['departmentsAndCourses'] as $index => $department) @php // Initialize caste count variables $bc_d_count = 0; $oc_count = 0; $sc_count = 0; // Loop through casteWiseCount and match the caste name foreach ($reportData['casteWiseCount'] as $caste) { if ($caste->caste_name === 'BC-D') { $bc_d_count = $caste->count; } if ($caste->caste_name === 'OC') { $oc_count = $caste->count; } if ($caste->caste_name === 'SC') { $sc_count = $caste->count; } } // Calculate Group Totals $group_totals = $bc_d_count + $oc_count + $sc_count; // Accumulate totals for the final row $total_bc_d += $bc_d_count; $total_oc += $oc_count; $total_sc += $sc_count; $total_group += $group_totals; @endphp @endforeach
S.No Department Name Course Name BC-D OC SC Group Totals
{{ $serial++ }} {{ $department->department_name }} {{ $department->course_name }}{{ $bc_d_count }} {{ $oc_count }} {{ $sc_count }} {{ $group_totals }}
Total {{ $total_bc_d }} {{ $total_oc }} {{ $total_sc }} {{ $total_group }}