In this video we are going to learn about Adding Confirmation on record deletion.
So let see how can we add confirmation on record deletion.
For that switch to the project.
And lets open admin-category-component.blade.php view file.
Now inside this file go inside the table and modify delete link and write as following code.

<a href=\"#\" onclick=\"confirm('Are you sure, You want to delete this category?') || event.stopImmediatePropagation()\" wire:click.prevent=\"deleteCategory({{$category->id}})\" style=\"margin-left:10px; \"><i class=\"fa fa-times fa-2x text-danger\"></i></a>

Now lets check it.
So switch to the project and refresh the page
Now lets delete any category So just click on delte link.
After clicking on delete lin you will see the confirmation message
Are you sure you want to delete this category?
If I click on cancel record is safe.
Click one more time on delete link.
This time click on ok then.
You will see category has been deleted.

Now lets add deletion confirmation with the Products.
So for that open admin-product-component.blade.php file and the following code inside the table.

<a href=\"#\" onclick=\"confirm('Are you sure, you want to delete this product?') || event.stopImmediatePropagation()\" style=\"margin-left:10px;\" wire:click.prevent=\"deleteProduct({{$product->id}})\"><i class=\"fa fa-times fa-2x text-danger\"></i></a>

Now lets check it.
Now go to the All Products page and delete any product.
And after clicking on delete link you will get the delete confirmation message.
So in this way you can add confirmation on record deletion so that's all about adding confirmation on record deletion.