@if($candidates)
@foreach ($candidates as $candidate)
@php
$k = 0;
if($candidate->training_program_id) {
$trainingProgramIds = json_decode($candidate->training_program_id, true);
$trainingProgramIds = array_map('intval', $trainingProgramIds);
/*
// Highlighting part: Check if the candidate's training matches PIA's training
foreach ($trainingProgramIds as $id) {
$matchingItem = collect($training)->firstWhere('id', $id);
$name = $matchingItem ? $matchingItem['training_name'] : null;
if ($name != null) {
$k = 1;
break; // Exit loop as we found a match
}
}
*/
}
@endphp
@if ($k == 1)
| {{ $loop->iteration }} |
{{ $candidate->name }} |
{{ $candidate->email }} |
{{ $candidate->mobile_Number }} |
{{ $candidate->category }} |
|
@else
| {{ $loop->iteration }} |
{{ $candidate->name }} |
{{ $candidate->email }} |
{{ $candidate->mobile_Number }} |
{{ $candidate->category }} |
|
@endif
@endforeach
@else
| No Records available now |
@endif