samedi 6 avril 2019

How to generate response like below in Laravel 5.8

This is the response which i'm getting if my ajax request ends up with validation errors...

{"readyState":4,"responseText":"{\"email\":[\"The email field is required.\"]}","responseJSON":{"email":["The email field is required."]},"status":422,"statusText":"Unprocessable Entity"}

Want to generate response in similar format, if request processed successfully. Would appreciate detailed description.

Went through various answers already posted here, but none of them help me out. Thanks :)



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire