Laravel 5.5:Ajax无法正常工作

A weird issue happening with me & I'm being unable to figure it out.

Ajax form submit not working in Laravel 5.5 although it works in Laravel 5.2. I mean the same code works for Laravel 5.2 but not for Laravel 5.5. I'm attaching my codes so that you can understand.

Html:

<form action="{{ url('/register') }}" method="POST" id="userRegistrationForm">
    ...........
    ...........
    <button type="submit">Register</button>
    {{ csrf_field() }}
</form>

JS:

$('#userRegistrationForm').validate({
    rules:{
        ......
    },
    messages:{
        ......
    },

    submitHandler: function(form){
        /* alert('Submit success!') */ /* It works, that means this function works properly */ 

        /* But this not works */
        $.ajax({
            url: form.action,
            type: form.method,
            data: $(form).serialize(),

            success: function(response){
                location.reload();
            },

            error: function(response){
                alert('error spotted');
            }
        });
    }
});

When I submit the registration from, JQuery validation works. But the form submits by default pattern, not by Ajax. Error not showing by Javascript alert.

your must stop preventing write your code like this

    $("#userRegistrationForm").submit(function(e) {
        e.preventDefault();
    }).validate({
        messages:{..},
        rules: {...},

        submitHandler: function(form) { 

           $.ajaxSetup({
               headers: {
                  'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
              }
           });
           $.ajax({
              url: form.action,
              type: form.method,
              data: $(form).serialize(),

           success: function(response){
               location.reload();
           },

           error: function(response){
              alert('error spotted');
           }
        });
            return false;  //This doesn't prevent the form from submitting.
        }
    });

Did you set csrf-token on your meta tags?

<meta name="csrf-token" content="{{ csrf_token() }}">

after your set token, you need to set headers for your ajax request, so you just need to add below code before your ajax request.

 $.ajaxSetup({
            headers: {
                'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
            }
        });
 $.ajax({
        url: form.action,
        type: form.method,
        ... : ...,