$.ajaxSetup({
headers: {
'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
}
});
var taskId = $('.task_id').val();
$.ajax({
method: 'POST',
data: JSON.stringify(data.items),
url: '/equipment/'+ taskId,
success: function (data)
{
location.replace(data);
}
});