JsonResponse
extends Response
in package
Table of Contents
- __construct() : mixed
- JsonResponse constructor.
Methods
__construct()
JsonResponse constructor.
public
__construct(mixed $data[, int $statusCode = 200 ][, array<string|int, mixed> $headers = [] ]) : mixed
Parameters
- $data : mixed
-
Data to encode as JSON.
- $statusCode : int = 200
-
HTTP status code.
- $headers : array<string|int, mixed> = []
-
Additional headers.