JSON Response With an HTTP Status Code
Use the status()
function to return JSON data with an HTTP status code.
This function is useful when returning errors.
Usage
Parameters:
The same as
respond()
.
Example
Last updated
Use the status()
function to return JSON data with an HTTP status code.
This function is useful when returning errors.
The same as respond()
.
Last updated