Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

hjortur17's avatar

Use Inertia to redirect inside a method

Hi, is it possible to redirect from a method using Inertia link? Because I want to validate a form before sending the customer forward to the next page? I was trying to add @click on the <Link> component but it redirected even if I had e.preventDeafult().

Any suggestions?

This is what I tried:

<Link
	@click="proceedBooking(e)"
	href="/book/proceed"
	class="rounded-full bg-green-300 px-6 py-1.5 font-bold uppercase text-green-50"
>
		Book now
</Link>
0 likes
2 replies

Please or to participate in this conversation.