Skip to main content

Black Friday 2025! Only until December 1st: coupon FRIDAY25 for 40% off Yearly/Lifetime membership!

Read more here

Deleting Records with Confirmation Prompt

Premium
2:43

The Full Lesson is Only for Premium Members

Want to access all of our courses? (29 h 46 min)

You also get:

55 courses
Premium tutorials
Access to repositories
Private Discord
Get Premium for $129/year or $29/month

Already a member? Login here

Comments & Discussion

B
bitvalentine ✓ Link copied!

Just encase you need to copy/paste

onclick=" return confirm('Are you sure?') || event.stopImmediatePropagation ()"

DN
Dale Nicholson ✓ Link copied!

Hopefully there's a better way to do the confirmation in Livewire. As said at the beginning of the tutorial, Livewire helps devs write zero JS. But now, we're just written a line of JS. Yes, it's only minor. But still :)

N
Nerijus ✓ Link copied!

Well yeah you can. You can make your own confirmation modal even with a native html dialog element and call it. But this is way quicker and simple. Or you can use something like sweetalert

We'd Love Your Feedback

Tell us what you like or what we can improve

Feel free to share anything you like or dislike about this page or the platform in general.