Does anyone know how I can submit a sign out form in Vue 3 only when a function is called? I have inserted related code below:
<form
@submit.prevent="handleSignOut($event)"
method="post"
action="/logout">
<input type="hidden" name="_token" :value="csrf">
<button type="submit">
Sign out
</button>
</form>
// handle sign out
const handleSignOut = function (e) {
// submit sign out here
}