Laravel 5.1 Custom HTTP Status Code and Status Text

Posted 3 years ago by Manzoor-Bajwa

Hi I'm working with RESTful web services. I want to return custom HTTP header status code and status text instead of default. For example if everything is OK then it returns 200 OK.

But what i want is to customize like so 401 You need to login again.

How do i do that?


Please sign in or create an account to participate in this conversation.

Reply to

Use Markdown with GitHub-flavored code blocks.