View on GitLab

Links

Links behave as Buttons (and have all of their parameters), but generate <a> HTML nodes.

href

href is serialized, obviously, as the actual URL to be linked.

<x-larastrap::link label="Yes, this is an anchor" color="info" :href="route('homepage')" />
<a id="link-e4df0e1881320eb39914812e415acdac" class="btn btn-info" href="https://larastrap.madbob.org">Yes, this is an anchor</a>

route

When linking to a named plain Laravel route with no arguments, you can just use the route shortcut and specify only the route's name.

<x-larastrap::link label="Yes, this is an anchor" color="info" route="homepage" />
<a id="link-a38a2ee9a6e716a6177177a9b25fdd97" class="btn btn-info" href="https://larastrap.madbob.org">Yes, this is an anchor</a>