0

I am using a link to delete a record.

html

<button class="button link alert" data-src="admin/category/{{ $category['id'] }}" data-method="delete"><i class="fa fa-trash danger"></i></button>

ajax

$.ajaxSetup({
    headers: {
        'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
    }
});

function http_post(url, postData){
return $.ajax({
    url:url,
    data: postData,
    type: 'DELETE'
});

route

Route::resource('category', 'CategoriesController');

response

public function destroy($id)
{
    return response()->json(['status'=>1]);
}

Now I am getting the response in chrome but not firefox.

Abel D
  • 860
  • 1
  • 16
  • 29

0 Answers0