*/ public function rules(): array { return [ 'name' => 'required|string|max:255', 'config' => '', ]; } /** * @param array $attributes */ public function handle(Formtemplate $formtemplate, array $attributes): void { $formtemplate->update($attributes); } public function asController(Formtemplate $formtemplate, ActionRequest $request): JsonResponse { $this->handle($formtemplate, $request->validated()); return response()->json([]); } }