. */ namespace FireflyIII\Support\Notifications; /** * Class UrlValidator */ class UrlValidator { /** * @param string $url * * @return bool */ public static function isValidWebhookURL(string $url): bool { return str_starts_with($url, 'https://hooks.slack.com/services/') || str_starts_with($url, 'https://discord.com/api/webhooks/'); } }