Manzoor-Bajwa
4 years ago
158
8
Laravel

Laravel 5.1 Custom HTTP Status Code and Status Text

Posted 4 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?

Thanks

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