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

Parents

{{--
Free Bootstrap 4 Admin Dashboard
--}}
@if (session('status')) @endif @if (session('error')) @endif

Data Parents

@foreach ($data as $item) @endforeach
Name Phone Number Student Name OTP Aksi
{{ ucwords($item->name) }} {{ $item->no_hp }} @php $student = DB::table('parent_students') ->select('student.name') ->join('student', 'student.id', 'parent_students.student_id') ->where('parent_id', $item->id) ->get(); @endphp @if (count($student) != 0) @foreach ($student as $ks => $vs) {{-- {{ $ks++ == count($student) ? 'asd' : 'ccd' }} {{ $ks }} {{ count($student) }} --}}
  • {{ ucwords($vs->name) }}
  • @endforeach @endif
    {{ $item->otp }}
    @method('delete') @csrf {{-- --}}
    @endsection