$input */ public function handle(array $input): void { $settings = app(FormSettings::class); $settings->fill([ 'registerUrl' => $input['register_url'], ]); $settings->save(); } /** * @return array */ public function rules(): array { return [ 'register_url' => 'present|string', ]; } public function asController(ActionRequest $request): RedirectResponse { $this->handle($request->validated()); return redirect()->back(); } }