Пример #1
0
 protected function generateAppointment($issuerId, $businessId, $contactId, $serviceId, Carbon $startAt, Carbon $finishAt, $comments = null, $humanresourceId = null)
 {
     $appointment = new Appointment();
     $appointment->doReserve();
     $appointment->setStartAtAttribute($startAt);
     $appointment->setFinishAtAttribute($finishAt);
     $appointment->business()->associate($businessId);
     $appointment->issuer()->associate($issuerId);
     $appointment->contact()->associate($contactId);
     $appointment->service()->associate($serviceId);
     $appointment->humanresource()->associate($humanresourceId);
     $appointment->comments = $comments;
     $appointment->doHash();
     return $appointment;
 }