Created means 201
Take your time, follow the code and check your understanding.
The codeLaravel routing and validation
return response()->json($product); // a newly created resourceYour answer4 min · no timer
Show solution and explanation
A JSON body and its status are separate. response()->json($product, 201) explicitly marks successful creation.
Pass 201 as the second argument for the intended created status.