weizong song 5 years ago
parent b705d87bd2
commit 45a01ee4ae

@ -419,9 +419,7 @@ class OrdersController extends CommonController
public function getParamedic($id) public function getParamedic($id)
{ {
$paramedic = (new Paramedic())->with(["project" => function ($query) { $paramedic = (new Paramedic())->with(["project","level"])->find($id);
$query->with("defaultProduct");
}])->find($id);
return response()->json($paramedic ? $paramedic->toArray() : null); return response()->json($paramedic ? $paramedic->toArray() : null);
} }
@ -512,11 +510,12 @@ class OrdersController extends CommonController
$patient = (new Patient())->firstOrCreate([ $patient = (new Patient())->firstOrCreate([
"customer_id" => $customer->id, "customer_id" => $customer->id,
"name" => request()->patient_mobile "name" => request()->patient_name
]); ]);
$patient->update([ $patient->update([
"age" => request()->patient_age, "age" => request()->patient_age,
"sex" => request()->patient_sex, "sex" => request()->patient_sex,
"mobile" => request()->patient_mobile,
]); ]);
$order = (new Orders())->create([ $order = (new Orders())->create([

Loading…
Cancel
Save