I am trying to store the data from multiple ratio buttons to the database. And the AJAX post request is below:
$.ajax({
url: '{{ route("checklist.store") }}',
method:'POST',
data:{
_token: CSRF_TOKEN,
data1 : value1,
data2 : value2
},
success:function(data){
console.log('success');
}
});
The message in the console is printed on the console but the item is not created in the database.
Store method in controller :
$hacInspectionsChecklistTable = HacInspectionsChecklistTable::create($request->all());