If I return an object:
return Response::json([
'hello' => $value
]);
the status code will be 200. How can I change it to 201, with a message and send it with the json object?.
I don't know if there is a way to just set the status code in Laravel.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…