@php $lasthistory = json_decode($lasthistories); $antecedants_data = json_decode($lasthistory->antecedants_data); $candidate_data = json_decode($lasthistory->candidate_data); $candidate_document_number = ''; if(isset($candidate_data->document_number)){ $candidate_document_number = $candidate_data->document_number; } $candidate_name_as_per_document = ''; if(isset($candidate_data->name_as_per_document)){ $candidate_name_as_per_document = $candidate_data->name_as_per_document; } $dob_as_per_document = ''; if(isset($candidate_data->dob_as_per_document)){ $dob_as_per_document = $candidate_data->dob_as_per_document; } if(isset($candidate_data->document_front_file)){ $document_front_file = $candidate_data->document_front_file; } else { $document_front_file = ''; } if(isset($antecedants_data->verification_date)){ $verification_date = $antecedants_data->verification_date; } else { $verification_date = ''; } if(isset($antecedants_data->severity)){ $severity = $antecedants_data->severity; } else { $severity = ''; } if(isset($antecedants_data->conclusion)){ $conclusion = $antecedants_data->conclusion; } else { $conclusion = ''; } $candidate_name = ''; if(isset($antecedants_data->candidate_name->value)){ $candidate_name = $antecedants_data->candidate_name->value; } $candidate_fathers_name = ''; if(isset($antecedants_data->fathers_name)){ $candidate_fathers_name = $antecedants_data->fathers_name; } $candidate_address = ''; if(isset($antecedants_data->address)){ $candidate_address = $antecedants_data->address; } $candidate_photo = ''; if(isset($antecedants_data->photo)){ $candidate_photo = $antecedants_data->photo; } if(isset($antecedants_data->name_as_per_document->match_status)){ $candidate_match_status = $antecedants_data->name_as_per_document->match_status; } else { $candidate_match_status = 'MATCHED'; } $dob = ''; if(isset($antecedants_data->dob->value)){ $dob = $antecedants_data->dob->value; } if(isset($antecedants_data->dob->match_status)){ $dob_match_status = $antecedants_data->dob->match_status; } else { $dob_match_status = 'MATCHED'; } if(isset($antecedants_data->dl_number->value)){ $dl_number = $antecedants_data->dl_number->value; } else { $dl_number = ''; } if(isset($antecedants_data->document_number->match_status)){ $document_number_match_status = $antecedants_data->document_number->match_status; } else { $document_number_match_status = 'MATCHED'; } if(isset($antecedants_data->issue_date)){ $issue_date = $antecedants_data->issue_date; } else { $issue_date = ''; } if(isset($antecedants_data->expiry_date)){ $expiry_date = $antecedants_data->expiry_date; } else { $expiry_date = ''; } $dl_status = 'IN_ACTIVE'; $expiry_date_formatted = DateTime::createFromFormat('d/m/Y', $expiry_date); $current_date = new DateTime(); if ($expiry_date_formatted > $current_date) { $dl_status = 'ACTIVE'; } if(isset($antecedants_data->severity_messages_id)){ $severity_messages_id = $antecedants_data->severity_messages_id; } else { $severity_messages_id = ''; } if(isset($antecedants_data->vehicle_class)){ if(is_array($antecedants_data->vehicle_class)){ $vehicle_class = implode(', ', $antecedants_data->vehicle_class); } else { $vehicle_class = $antecedants_data->vehicle_class; } } else { $vehicle_class = ''; } @endphp