@php $lasthistory = json_decode($lasthistories); $antecedants_data = json_decode($lasthistory->antecedants_data); $candidate_data = json_decode($lasthistory->candidate_data); function getProperty($data, $property, $subProperty = 'value', $defaultValue = '') { return isset($data->$property->$subProperty) ? $data->$property->$subProperty : $defaultValue; } $verification_date = $antecedants_data->verification_date ?? ''; $severity = $antecedants_data->severity ?? ''; $conclusion = $antecedants_data->conclusion ?? ''; $name_of_employer = $antecedants_data->name_of_employer ?? ''; $name_of_employer_match_status = getProperty($antecedants_data, 'name_of_employer', 'match_status'); $cemployer_name = $candidate_data->employer_name ?? ''; $period_of_employement = getProperty($antecedants_data, 'period_of_employement'); $period_of_employement_match_status = getProperty($antecedants_data, 'period_of_employement', 'match_status'); $cemployment_period = $candidate_data->employment_period ?? ''; $designation = getProperty($antecedants_data, 'designation'); $designation_match_status = getProperty($antecedants_data, 'designation', 'match_status'); $cdesignation = $candidate_data->designation ?? ''; $eligibility_for_rehire = getProperty($antecedants_data, 'eligibility_for_rehire'); $feedback = getProperty($antecedants_data, 'feedback'); $referees_details = getProperty($antecedants_data, 'referees_details'); $additional_comments = getProperty($antecedants_data, 'additional_comments'); $exit_formalities = getProperty($antecedants_data, 'exit_formalities'); $verification_mode = getProperty($antecedants_data, 'verification_mode'); $severity_messages_id = getProperty($antecedants_data, 'severity_messages_id'); $verifier_name = getProperty($antecedants_data, 'verifier_name'); $verified_on = getProperty($antecedants_data, 'verified_on'); @endphp