У меня есть некоторые почтовые данные, и я сохраняю их под идентификатором пользователя, и я хочу, чтобы данные уже были сохранены под тем же идентификатором пользователя, и если я снова нажму на запрос с тем же идентификатором пользователя, он не должен добавлять эти данные:
Мой код указан ниже:
$this->medicalIdentifiers->user_id = $doctorProfile['user_id'];
$this->medicalIdentifiers->medical_credentials = $doctorProfile['medical_credentials'];
$this->medicalIdentifiers->registration_number = $doctorProfile['registration_number'];
$this->medicalIdentifiers->registration_expiration_date = $doctorProfile['registration_expiration_date'];
$this->medicalIdentifiers->dea_number = $doctorProfile['dea_number'];
$this->medicalIdentifiers->dea_expiration_date = $doctorProfile['dea_expiration_date'];
$this->medicalIdentifiers->dea_issue_date = $doctorProfile['dea_issue_date'];
$this->medicalIdentifiers->npi_number = $doctorProfile['npi_number'];
$this->medicalIdentifiers->billing_title = $doctorProfile['billing_title'];
$this->medicalIdentifiers->billing_employment_type = $doctorProfile['billing_employment_type'];
$this->medicalIdentifiers->other_employment_type = $doctorProfile['other_employment_type'];
$this->medicalIdentifiers->nadean_number = $doctorProfile['nadean_number'];
$this->medicalIdentifiers->upin = $doctorProfile['upin'];
$this->medicalIdentifiers->wcb_authorization = $doctorProfile['wcb_authorization'];
$this->medicalIdentifiers->wcb_rating_code = $doctorProfile['wcb_rating_code'];
$this->medicalIdentifiers->wcb_date_of_issue = $doctorProfile['wcb_date_of_issue'];
$this->medicalIdentifiers->hospital_privileges = $doctorProfile['hospital_privileges'];
$this->medicalIdentifiers->save();
Я передаю user_id в запросе и использую почтальон для запроса
Ваша помощь будет высоко оценена!
Заранее спасибо