request instanceof SetParticipationStateSignoffRequest: $this->request->participant->unregistered_at = $this->request->date; $this->request->participant->save(); $response->success = true; Mail::to($this->request->participant->email_1)->send(new ParticipantSignOffMail( participant: $this->request->participant, )); if ($this->request->participant->email_2 !== null) { Mail::to($this->request->participant->email_2)->send(new ParticipantSignOffMail( participant: $this->request->participant, )); } break; case $this->request instanceof SetParticipationStateReSignonRequest: $this->request->participant->unregistered_at = null; $this->request->participant->save(); Mail::to($this->request->participant->email_1)->send(new EventSignUpSuccessfullMail( participant: $this->request->participant, )); if ($this->request->participant->email_2 !== null) { Mail::to($this->request->participant->email_2)->send(new EventSignUpSuccessfullMail( participant: $this->request->participant, )); } break; } return $response; } }