How to Delete Data in Laravel using AJAX without Refreshing the Page

preview_player
Показать описание
#deletedatainlaravelusingajax

Support This Channel :

Join this channel to get access to perks:

Your support will be really appreciated.

Thanks For Watching.
I hope This video was helpful. If you have any questions then let me know in the comment section.

Best of luck

#webtechknowledge

You can connect with me with the given links below:

Рекомендации по теме
Комментарии
Автор

<script type="text/javascript">

function deletepost(id)
{

if(confirm("Are you sure to delete this"))
{

$.ajaxSetup({

headers:
{

'X-CSRF-TOKEN':
}

});



$.ajax({

url:'delete_post/'+id,
type:'DELETE',

success:function(result)
{

}


});



}



}


</script>

WebTechKnowledge
Автор

Hi ...brother

You're the best one. To explain the concepts of laravel, please make more videos if possible to you. Thank you.

kanthareddy
Автор

what an excellent explanation thanks a lot🙏🙏🙏

ETcodenet
Автор

<script type="text/javascript">
function deletepost(id)
{
if(confirm("Are you sure to delete this"))
{
$.ajaxSetup({
headers:
{
'X-CSRF-TOKEN':
}
});
$.ajax({
url:'delete_post/'+id,
type:'DELETE',
success:function(result)
{

}
});
}
}
</script>

Hey Sir u defined so well but the preferred way is to remove the element instead of hiding it, use remove method instead of slideup, Jazaka Allah <3

ibrownlad