Last updated on February 17, 2018
It’s always better to ask for the confirmation while deleting items with alert prompt. So here I am gonna show you, how to show the confirmation prompt with Javascript within your Laravel application.
HTML for delete button
If you seen below code, $items is iterable object, its generating likes for all the available items.
@foreach ($items as $item)@endforeach
Javascript to show the confirm prompt
Place below javaScript in your page footer area.