@php // Ensure consistent order as requested: // Reference, To Do, Doing, Done, Testing, Verified, Not Assigned, Done But Not Deployed, then others $order = [ 'reference', 'to do', 'todo', 'doing', 'done', 'testing', 'verified', 'not assigned', 'not-assigned', 'done but not deployed', 'done-but-not-deployed' ]; $ordered = $board->lists->sortBy(function($l) use ($order){ $name = strtolower(trim($l->name ?? '')); $idx = array_search($name, $order, true); return $idx === false ? 999 : $idx; }); @endphp @foreach ($ordered as $list)

{{ $list->name }}

+

@foreach ($list->cards as $card) @include('hr-management.partials.card-item', ['card' => $card]) @endforeach
@endforeach