label('iCal-Export-Adresse des Portals') ->helperText('Im Vermieterbereich des Portals unter „Kalender exportieren“. Leer lassen, wenn das Portal keinen Kalender anbietet.') ->url() ->maxLength(2048), ]; } public function canImport(Channel $channel): bool { return filled($channel->setting('import_url')); } public function fetchOccupations(Channel $channel): array { $url = preg_replace('#^webcals?://#i', 'https://', (string) $channel->setting('import_url')); try { $response = Http::timeout(20) ->retry(2, 1000) ->withHeaders(['Accept' => 'text/calendar']) ->get($url) ->throw(); } catch (ConnectionException|RequestException $exception) { throw new ChannelSyncException('Kalender konnte nicht abgerufen werden: '.$exception->getMessage(), previous: $exception); } return $this->parser->parse($response->body()); } }