1$('form').submit(function(event) {
2 event.preventDefault();
3 var formData = new FormData($(this)[0]);
4 $.ajax({
5 url: '{{ url('/agents') }}',
6 type: 'POST',
7 data: formData,
8 success: function(result)
9 {
10 location.reload();
11 },
12 error: function(data)
13 {
14 console.log(data);
15 }
16 });
17
18});
19