If I return an object:
return Response::json([ \'hello\' => $value ]);
the status code will be 200. How can I change it to 201, with
This is how I do it in Laravel 5
return Response::json(['hello' => $value],201);
Or using a helper function:
return response()->json(['hello' => $value], 201);