|
@@ -52,8 +52,7 @@ class Appointment extends Model
|
|
|
{
|
|
|
$daytimestamp = strtotime($daytime);
|
|
|
if (strtotime(date('Y-m-d')) > $daytimestamp) {
|
|
|
- $daytimestamp = strtotime($daytime . ' +1 year');
|
|
|
-// throw new Exception("该时间已过期,请重新选择时间");
|
|
|
+ throw new Exception("该时间已过期,请重新选择时间");
|
|
|
}
|
|
|
|
|
|
$daytimeWeek = date('w', $daytimestamp);
|
|
@@ -68,11 +67,11 @@ class Appointment extends Model
|
|
|
continue;
|
|
|
}
|
|
|
(new AppointmentTicket())->allowField(true)->save([
|
|
|
- 'appointment_id' => $appoint->id,
|
|
|
+ 'appointment_id' => $appoint->id,
|
|
|
'appointment_daytime' => $daytimestamp,
|
|
|
- 'address_id' => $appoint->specialist->address_id,
|
|
|
- 'provider_id' => $appoint->provider_id,
|
|
|
- 'status' => AppointmentTicket::STATUS_OPEN,
|
|
|
+ 'address_id' => $appoint->specialist->address_id,
|
|
|
+ 'provider_id' => $appoint->provider_id,
|
|
|
+ 'status' => AppointmentTicket::STATUS_OPEN
|
|
|
]);
|
|
|
}
|
|
|
}
|