I
I
Ingvar Von Bjork2020-05-18 22:04:59
Laravel
Ingvar Von Bjork, 2020-05-18 22:04:59

How to fix 500 error when submitting via Ajax?

There is a #reception_data form. The form specifies {{ csrf_field() }}. I serialize and edit this form like this:

$.ajax({
  type: 'POST',
  url: '/send',
  data: $('#reception_data').serialize(),
  success: function (data) {
    console.log('seccess');
  },
  error: function () {
    console.log('error');
  }
})

And in response I get:
500 (Internal Server Error)
What am I doing wrong?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
P
P747, 2020-05-18
@DeboshiR

Watch server side code

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question