@php $repair = []; if (!empty($view_data['job_sheet'])) { $repair['repair_status_id'] = $view_data['job_sheet']['status_id']; $repair['repair_security_pwd'] = $view_data['job_sheet']['security_pwd']; $repair['repair_security_pattern'] = $view_data['job_sheet']['security_pattern']; $repair['customer_id'] = $view_data['job_sheet']['contact_id']; } elseif (!empty($transaction)) { $repair['repair_status_id'] = $transaction['repair_status_id']; $repair['repair_security_pwd'] = $transaction['repair_security_pwd']; $repair['repair_security_pattern'] = $transaction['repair_security_pattern']; } @endphp