@extends('layouts.master') @section('title', 'Workload Arrangement for Administrative Position') @section('style') @endsection @section('script') @endsection @section('content') @include('layouts.header') @include('layouts.title')
@yield('title')


@foreach ($teaching_types as $item) @endforeach @foreach ($WATeachings as $index => $w) {{-- แสดงเสมอ --}} {{-- Unit (ถ้ายังไม่มี regular จะเป็น -) --}} @php $unitRow = $teachings ->where('teaching_name', $w->WATeaching_id) ->first(); @endphp {{-- dynamic teaching_type columns --}} @foreach ($teaching_types as $item) @php $value = $teachings ->where('teaching_name', $w->WATeaching_id) ->where('teaching_type_id', $item->teaching_type_id) ->first(); @endphp @endforeach @endforeach
No. Workload Arrangement Unit{{ $item->teaching_type_name }}
{{ $index + 1 }}{{ $w->WATeaching_title }}{{ $unitRow->unit_name ?? '-' }} {{ $value->teaching_value ?? '-' }}
@include('layouts.footer') @endsection