weizong song 5 years ago
parent b705d87bd2
commit 45a01ee4ae

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

Loading…
Cancel
Save