Your Controller method has a dd('xxx') line in it. This basically 'dumps and dies' so nothing after it will run. As far as AJAX is concerned, your method ran successfully (it did what is was supposed to do without error), which is why you get the success handler being fired. The info returned to your success handler will just be 'xxx', but your handler is trying to read data.retorno, which obviously doesn't exist.
What exactly is it you're trying to do with the dd('xxx') line?
Eduardo Fuerte
ASKER
Hi Chris
Really.
This is a symptom of the last question whith my attempts to make the method to be called.
Now that the method seens to be called what I need is to trace what is done on it.
This method, called by JS, must to save data on table Vitrines - that isn't done.
Chris Stanyon
As soon as you call dd(), your method will stop - nothing after it will run, so your code never gets to the part that saves the record.
Remove the dd() line and see how you go.
You can also make your life a little easier by using the firstOrNew() method.
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
Something else to look at is your variable names. Your request contains _token, id, url, ignicio, termino, title, description, points but your method is using variable called $titulo, $descricao, $pontuacao which are never set anywhere.
Eduardo Fuerte
ASKER
Yes, I saw this, it's due an adaptation from another table. I had adjusted it.
Your Controller method has a dd('xxx') line in it. This basically 'dumps and dies' so nothing after it will run. As far as AJAX is concerned, your method ran successfully (it did what is was supposed to do without error), which is why you get the success handler being fired. The info returned to your success handler will just be 'xxx', but your handler is trying to read data.retorno, which obviously doesn't exist.
What exactly is it you're trying to do with the dd('xxx') line?