@extends('layouts.app') @section('title', 'Kit Service | Manage Functions') @section('content')
Dashboard Functions

Manage Functions

@if(session('success'))
✔️ {{ session('success') }}
@endif @if ($errors->any())
⚠️ {{ $errors->first() }}
@endif
@csrf
@php $counter = 1; @endphp @foreach($departments as $dept) @php $deptFunctions = $functions->where('department_id', $dept->id); $rowspan = $deptFunctions->count(); $first = true; @endphp @foreach($deptFunctions as $func) @if($first) @php $first = false; @endphp @endif @endforeach @endforeach
# Department Function
{{ $counter++ }} {{ $dept->name }} {{ $func->name }}
@endsection