@extends('frontend.index') @section('content')
  • @lang('frontend.section_wise_student')
  • @if($class) @foreach ($class as $c) @php $count_student = DB::connection('mysql_second')->table('running_student_info')->where('class_id',$c->id)->count(); $total_student = 0; @endphp @if($count_student > 0) @endif @endforeach @endif
    {{$c->class_name}}
    @if($group) @foreach ($group as $g) @if($c->id == $g->class_id) @endif @endforeach @endif
    {{$g->group_name}} @if($section) @foreach ($section as $s) @if($s->class_id == $c->id && $s->group_id == $g->id) @endif @endforeach @endif
    {{$s->section_name}} @php $male_student = DB::connection('mysql_second')->table('running_student_info') ->where('running_student_info.class_id',$c->id) ->where('running_student_info.group_id',$g->id) ->where('running_student_info.section_id',$s->id) ->join('student_personal_info','student_personal_info.id','running_student_info.student_id') ->where('student_personal_info.gender','Male') ->count(); $female_student = DB::connection('mysql_second')->table('running_student_info') ->where('running_student_info.class_id',$c->id) ->where('running_student_info.group_id',$g->id) ->where('running_student_info.section_id',$s->id) ->join('student_personal_info','student_personal_info.id','running_student_info.student_id') ->where('student_personal_info.gender','Female') ->count(); $total_student = $total_student + $male_student + $female_student; @endphp
    @lang('frontend.male') @lang('frontend.female')
    {{$male_student}} {{$female_student}}
    @lang('frontend.total') {{$total_student}}

@include('frontend.sidebar')
@endsection