I have set the meta and header for ajax setup and already done a action with ajax. But this time at same place I have faced the error. I can't find out my problem.
var per = new Array(); $("input[name='permission']:checked").each(function() { per.push($(this).val()); }); $.ajax({ url:"/admin-role", method:"POST", data:{ "_token": "{{ csrf_token() }}", "role_name":role_name, "permission":per }, dataType:'json', success:function(response){ console.log(response); } // success:function(response){ // if (response.status=='errors') { // Swal.fire( // response.message // ) // } // if (response.status=='success') { // Swal.fire( // response.message // ) // $('#roleModal').modal('hide'); // $("#role_create_form")[0].reset(); // $('.table').load(location.href + ' .table'); // } // } });
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)