delete(); } else { $participant->update(['cancelled_at' => now()]); } } public function asController(ActionRequest $request, Participant $participant): void { $this->startJob($participant->id, $request->header('X-Force') === '1'); } /** * @param mixed $parameters */ public function jobState(WithJobState $jobState, ...$parameters): WithJobState { return $jobState ->after('Teilnehmer gelöscht.') ->failed('Löschen von Teilnehmer fehlgeschlagen.') ->shouldReload(JobChannels::make()->add('participant')); } }