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-15685b85" 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-aa401756" class="btn btn-info" href="https://larastrap.madbob.org">Yes, this is an anchor</a>