wire:click
Overview
You can listen for click events within your templates using wire:click and provide an action to run when clicked.
Add wire:click on any HTML elements, not just buttons and links.
Using on links
When adding wire:click to links, you need to include the .prevent modifier to stop the default handling of a link in the browser. Otherwise, the browser will load the link and update the page's URL.
Last updated