DEV Community

Mahedi Hasan
Mahedi Hasan

Posted on

Delete Record using Ajax Request in Laravel

Today i will show you how to delete data ajax request in Laravel. you have to simply follow few things to make done delete record from database using ajax request.we will create delete route with controller method(we will write delete row code using database model) and write jquery ajax code with delete post request. we also pass csrf token in jquery ajax request, otherwise it will return error like delete method not allowed.

https://www.codechief.org/article/delete-record-using-ajax-request-in-laravel

Top comments (1)

Collapse
 
ezhurik profile image
Rishi Ezhava

data:{'_method':'DELETE'},
send this data with your ajax call.