SearchResponse::json()
Creates a json response with appropriate header and automatic conversion of arrays.
SearchResponse::json(array|string $body = '', int|null $code = null, bool $pretty = false, array $headers = []): SearchResponse
Parameters
| Name | Type | Default |
|---|---|---|
| $body | arrayorstring |
''
|
| $code | intornull |
null
|
| $pretty | bool |
false
|
| $headers | array |
[]
|
Return type
Kirby\Panel\Response\SearchResponse
Parent class
Kirby\Panel\Response\SearchResponse
inherited from Kirby\Http\Response