Level 63
If you need to customize the returned message, you can do that.
Otherwise I think it's not necessary because Laravel returns automatically the correct code. That's what I notice with my API methods.
1 like
Summer Sale! All accounts are 50% off this week.
Hello
If I have an ajax call to some method in my controller, which updates the DB, what is a proper way to return the status to the frontend?
do you return response(...) with the correct code? Or something else?
thanks
Please or to participate in this conversation.