@extends('template.app') @section('content')

Dashboard

Dashboard
@if (session('message')) @endif

Certificate Authorization


@foreach ($class as $key => $item) {{-- {{ dd($item) }} --}}
@php $studentCount = DB::table('student') ->where('priceid', $item->priceid) ->where('day1', $item->day1) ->where('day2', $item->day2) ->where('id_teacher', $item->id_teacher) ->where('course_time', $item->course_time) ->get(); // dd($studentCount); $countStudent = []; foreach ($studentCount as $keyS => $valueS) { array_push($countStudent, $valueS); // if ($valueS->is_certificate == true) { // array_push($countStudent, $valueS); // } } @endphp @if ($item->program == 'Private' || $item->program == 'Semi Private') @php $studentName = DB::table('student') ->where('priceid', $item->priceid) ->where('day1', $item->day1) ->where('day2', $item->day2) ->where('id_teacher', $item->id_teacher) ->where('course_time', $item->course_time) ->first(); @endphp {{ ucwords($studentName->name) }} @else {{ $item->program }} @endif

{{ $item->day_one }} {{ $item->day_two != $item->day_one ? ' & ' . $item->day_two : '' }}
{{ $item->course_time }}
{{ $item->teacher_name }}
View
@endforeach
@endsection