I am trying to make a link pointing to # but am unable to find a method that works.
The output i would like to see is
<a href="#">Example</a>
I have tried a few variations of the following without success.
$url = Url::fromUserInput('#');
$link_item = Link::fromTextAndUrl(t('Example'), $url);
return $link_item->toRenderable();
I have also tried using ::fromUri etc and am unable to find a method that produces tehd esired output, please help.