Свойство | Type | Description | |
---|---|---|---|
$data | array | ||
$meta | array | ||
$pagination | array | ||
$raw | array |
Méthode | Description | |
---|---|---|
__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. |
Méthode | Description | |
---|---|---|
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 | ||
Résultat | string |
public static createFromJson ( array $response ) : static | ||
$response | array | |
Résultat | static |
protected isCollection ( array | |
||
$data | array | |
|
Résultat | boolean |
public merge ( |
||
$response | ||
Résultat |