Свойство | Тип | Описание | |
---|---|---|---|
$data | array | ||
$meta | array | ||
$pagination | array | ||
$raw | array |
Метод | Описание | |
---|---|---|
__construct ( array $meta = [], array $data = [], array $pagination = [] ) | Creates a new instance of :php:class:Response. | |
__toString ( ) : string | Returns the JSON-encoded raw response. | |
createFromJson ( array $response ) : static | Creates a new instance of :php:class:Response from a JSON-decoded response body. | |
get ( ) : array | |
Gets the response body. If the response contains multiple records, a Collection is returned. | |
getRaw ( string | null $key = null ) : array | Gets the JSON-decoded raw response. | |
hasPages ( ) : boolean | If the response has a pagination field with a next_url key, then returns true, otherwise false. | |
merge ( |
Merges the contents of this response with $response and returns a new :php:class:Response instance. | |
nextUrl ( ) : string | null | Returns the next URL, if available, otherwise null. |
Метод | Описание | |
---|---|---|
isCollection ( array | |
Tests the current response data to see if one or more records were returned. | |
isRecord ( array | |
Tests the current response data to see if a single record was returned. |
public __toString ( ) : string | ||
Результат | string |
public static createFromJson ( array $response ) : static | ||
$response | array | |
Результат | static |
protected isCollection ( array | |
||
$data | array | |
|
Результат | boolean |
public merge ( |
||
$response | ||
Результат |