1$.ajaxSetup({
2 headers: {
3 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
4 }
5 });
6 $(".btn-submit").click(function(e){
7 e.preventDefault();
8 var name = $("input[name=name]").val();
9 var password = $("input[name=password]").val();
10 var email = $("input[name=email]").val();
11 $.ajax({
12 type:'POST',
13 url:'/ajaxRequest',
14 data:{name:name, password:password, email:email},
15 success:function(data){
16 alert(data.success);
17 }
18 });
19 });
1$.ajaxSetup({
2 headers: {
3 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
4 }
5});
6
7$.ajax({
8
9});