Menu

## PurchaseHistoryController extends Controller
in package
uses HandlesGuzzleRequests

PurchaseHistoryController.php : 16

### Table of Contents

#### Methods

guzzleImagePost() : ResponseInterface
  Perform a POST request that can send files using multipart/form-data.
index() : mixed
guzzleGet() : array<string|int, mixed>|null
  Perform a GET request using Guzzle and return decoded JSON.
guzzlePost() : array<string|int, mixed>|null
  Perform a POST request using Guzzle and return decoded JSON.

### Methods

#### guzzleImagePost()

HandlesGuzzleRequests.php : 79

Perform a POST request that can send files using multipart/form-data.

`public guzzleImagePost(string $url[, array<string|int, mixed> $data = [] ][, bool $hasFile = false ]) : ResponseInterface`

##### Parameters

$url : string

  Endpoint URL

$data : array<string|int, mixed> = []

  Form data or files

$hasFile : bool = false

  Whether the payload includes uploaded files

##### Return values

ResponseInterface

#### index()

PurchaseHistoryController.php : 20
`public index(Request $request) : mixed`

##### Parameters

$request : Request

#### guzzleGet()

HandlesGuzzleRequests.php : 16

Perform a GET request using Guzzle and return decoded JSON.

`protected guzzleGet(string $url[, array<string|int, mixed> $params = [] ]) : array<string|int, mixed>|null`

##### Parameters

$url : string

  Endpoint URL

$params : array<string|int, mixed> = []

  Query parameters

##### Return values

array<string|int, mixed>|null —

Decoded response or null on failure

#### guzzlePost()

HandlesGuzzleRequests.php : 46

Perform a POST request using Guzzle and return decoded JSON.

`protected guzzlePost(string $url[, array<string|int, mixed> $data = [] ][, bool $asJson = false ]) : array<string|int, mixed>|null`

##### Parameters

$url : string

  Endpoint URL

$data : array<string|int, mixed> = []

  Payload data

$asJson : bool = false

  When true sends JSON, otherwise form-params

##### Return values

array<string|int, mixed>|null —

Decoded response or null on failure

## Search results