Following is my ajax function
$(document).on('click','.formsubmitbtn',function(){
var owner = $("#formowner").val();
var remark = $("#formremark").val();
var unreline_id = $("#formurelineid").val();
var cat = $("#formcat").val();
var action = $(this).attr('action');
var doc = $("#doc").val();
$.ajax({
"url":"{{url('formsubmit')}}",
"type":"POST",
"data":{
"owner":owner,
"remark":remark,
"unreline_id":unreline_id,
"cat":cat,
"action":action,
"doc":doc
},
success:function(result){
console.log(result);
}
});
});
where doc is a file.
How do send the file values to the controller.
Plz help.