In a Laravel project I want to delete an item using ajax. My route is
Route::resource('title','TitleController');
Here is my ajax code
$.ajax({
url:'title',
type: 'post',
data: {_method: 'delete', _token :token, id : id},
success:function(msg){
console.log(msg);
}
});
So how to use DELETE method in a ajax with a parameter for deleting items ?