RandsX's avatar

How do you set the HTTP_STATUS_CODE?

I am confused how to set HTTP_STATUS_CODE in laravel, please tell me how to set it

0 likes
2 replies
MichalOravec's avatar
Level 75

For example

return response('Hello World', 200)

But almost in all response function you can set it.

view($view, $data = [], $status = 200, array $headers = [])

Also

return response()->setStatusCode(202);
1 like

Please or to participate in this conversation.