Changing the HTTP Status Code | Laravel 5: Accessing and Sending HTTP Responses With response
To change the status code of the response simply supply an argument for the $status parameter: 1 // Create a response with the `404` status code. 2 return response ( ' That page was not found. ' , 404 ) ;