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