class ImageResponse implements Stringable, Countable, Htmlable

Traits

Properties

Response|null $raw

The raw HTTP response, if available for the provider.

from  HasRawResponse

Methods

withRawResponse(Response|null $response)

Set the raw HTTP response.

array
__serialize()

Prepare the instance for serialization, discarding the unserializable raw HTTP response.

__construct(Collection $images, ImageUsage $usage, Meta $meta)

Create an image response.

firstImage()

Get the first image in the response.

string|false
store(string $path = '', UnitEnum|string|null $disk = null, array $options = [])

Store the image on a filesystem disk.

string|false
storePublicly(string $path = '', UnitEnum|string|null $disk = null, array $options = [])

Store the image on a filesystem disk with public visibility.

string|false
storePubliclyAs(string $path, string|null $name = null, UnitEnum|string|null $disk = null, array $options = [])

Store the image on a filesystem disk with public visibility.

string|false
storeAs(string $path, string|null $name = null, UnitEnum|string|null $disk = null, array $options = [])

Store the image on a filesystem disk.

string
toHtml(string $alt = '')

Get an tag for the image.

int
count()

Get the number of images that were generated.

string
__toString()

Get the raw string content of the image.

Details

in HasRawResponse at line 19
HasRawResponse withRawResponse(Response|null $response)

Set the raw HTTP response.

Parameters

Response|null $response

Return Value

HasRawResponse

in HasRawResponse at line 29
array __serialize()

Prepare the instance for serialization, discarding the unserializable raw HTTP response.

Return Value

array

at line 27
__construct(Collection $images, ImageUsage $usage, Meta $meta)

Create an image response.

Parameters

Collection $images
ImageUsage $usage
Meta $meta

at line 37
GeneratedImage firstImage()

Get the first image in the response.

Return Value

GeneratedImage

at line 49
string|false store(string $path = '', UnitEnum|string|null $disk = null, array $options = [])

Store the image on a filesystem disk.

Parameters

string $path
UnitEnum|string|null $disk
array $options

Return Value

string|false

at line 57
string|false storePublicly(string $path = '', UnitEnum|string|null $disk = null, array $options = [])

Store the image on a filesystem disk with public visibility.

Parameters

string $path
UnitEnum|string|null $disk
array $options

Return Value

string|false

at line 65
string|false storePubliclyAs(string $path, string|null $name = null, UnitEnum|string|null $disk = null, array $options = [])

Store the image on a filesystem disk with public visibility.

Parameters

string $path
string|null $name
UnitEnum|string|null $disk
array $options

Return Value

string|false

at line 73
string|false storeAs(string $path, string|null $name = null, UnitEnum|string|null $disk = null, array $options = [])

Store the image on a filesystem disk.

Parameters

string $path
string|null $name
UnitEnum|string|null $disk
array $options

Return Value

string|false

at line 81
string toHtml(string $alt = '')

Get an tag for the image.

Parameters

string $alt

Return Value

string

at line 96
int count()

Get the number of images that were generated.

Return Value

int

at line 104
string __toString()

Get the raw string content of the image.

Return Value

string