Commit 388f59c6 by 赵增煜

解析证书上传的地址

parent c2f2fb31
......@@ -154,14 +154,14 @@ public function update(Request $request)
$practicing_license_path = '';
if( !empty($practicing_license) ){
$practicing_licenses = parse_url($practicing_license);
$practicing_license_path = $practicing_licenses['path'];
$practicing_license_path = $practicing_licenses['path'] ?? '';
}
$physician_license = $request->input('physician_license');
$physician_license_path = '';
if( !empty($physician_license) ){
$physician_licenses = parse_url($physician_license);
$physician_license_path = $physician_licenses['path'];
$physician_license_path = $physician_licenses['path'] ?? '';
}
$pharmacist->name = str_replace(' ', '', $request->input('name'));
......@@ -171,7 +171,7 @@ public function update(Request $request)
$pharmacist->practicing_license = $practicing_license_path; // 执业注册证书链接
$pharmacist->practicing_license_expired_time = $request->input('practicing_license_expired_time');
$pharmacist->physician_license = $physician_license_path; // 执业资格证书链接
if ($pharmacist->save()) {
return $this->success($pharmacist);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment