*/ public function rules(): array { /** @var Form */ $form = request()->route('form'); return $form->getRegistrationRules(); } /** * @return array */ public function getValidationAttributes(): array { /** @var Form */ $form = request()->route('form'); return $form->getRegistrationAttributes(); } /** * @return array */ public function getValidationMessages(): array { /** @var Form */ $form = request()->route('form'); return $form->getRegistrationMessages(); } public function handle(Form $form, ActionRequest $request): JsonResponse { $form->participants()->create(['data' => $request->validated()]); ExportSyncAction::dispatch($form->id); Succeeded::message('Teilnehmer*in erstellt.')->dispatch(); return response()->json([]); } }