class Image extendsModel implementsFile

This model stores information on an image file in the file system.

Traits

Properties

bool $timestamps Don't maintain timestamps for this model.
protectedarray $hidden The attributes hidden in the model's JSON form.
protectedarray $casts The attributes that should be casted to native types.
protectedarray $dates The attributes that should be mutated to dates.

Methods

setJsonAttr(string$key,mixed$value,string$attrs ='attrs')

Set a dynamic JSON attribute.

mixed
getJsonAttr(string$key,mixed$default =null,string$attrs ='attrs')

Get a dynamic JSON attribute.

string
getUrl()

Get the file URL.

BelongsTo
volume()

The volume, this image belongs to.

BelongsTo
annotations()

The annotations on this image.

HasMany
labels()

The labels, this image got attached by the users.

string
getUrlAttribute()

Adds the url attribute to the image model. The url is the absolute path to the original image file.

setMetadataAttribute(array$value)

Set the image metadata attribute.

array
getMetadataAttribute()

Get the image metadata attribute.

Response
getFile()

Get the original image as download response.

setWidthAttribute(int$value)

Set the width attribute.

int|null
getWidthAttribute()

Get the width attribute.

setHeightAttribute(int$value)

Set the height attribute.

int|null
getHeightAttribute()

Get the height attribute.

setSizeAttribute(int$value)

Set the size attribute.

int|null
getSizeAttribute()

Get the size attribute.

setMimetypeAttribute(string$value)

Set the mimetype attribute.

string|null
getMimetypeAttribute()

Get the mimetype attribute.

setTilingInProgressAttribute(bool$value)

Set the tilingInProgress attribute.

bool|null
getTilingInProgressAttribute()

Get the tilingInProgress attribute.

Details

protected setJsonAttr(string$key,mixed$value,string$attrs ='attrs')

Set a dynamic JSON attribute.

Parameters

string $key Key of the attribute in the JSON.
mixed $value Value of the attribute in the JSON.
string $attrs Name of the JSON column of the model.

protectedmixed getJsonAttr(string$key,mixed$default =null,string$attrs ='attrs')

Get a dynamic JSON attribute.

Parameters

string $key Key of the attribute in the JSON.
mixed $default Default value.
string $attrs Name of the JSON column of the model.

Return Value

mixed

at line60
string getUrl()

Get the file URL.

This may be a remote URL starting with "http://" or "https://", or a storage disk path starting with "[disk-name]://".

Return Value

string

at line70
BelongsTo volume()

The volume, this image belongs to.

Return Value

BelongsTo

at line80
BelongsTo annotations()

The annotations on this image.

Return Value

BelongsTo

at line90
HasMany labels()

The labels, this image got attached by the users.

Return Value

HasMany

at line101
string getUrlAttribute()

Adds the url attribute to the image model. The url is the absolute path to the original image file.

Return Value

string

at line111
setMetadataAttribute(array$value)

Set the image metadata attribute.

Parameters

array $value

at line121
array getMetadataAttribute()

Get the image metadata attribute.

Return Value

array

at line131
Response getFile()

Get the original image as download response.

Return Value

Response

at line173
setWidthAttribute(int$value)

Set the width attribute.

Parameters

int $value

at line183
int|null getWidthAttribute()

Get the width attribute.

Return Value

int|null

at line193
setHeightAttribute(int$value)

Set the height attribute.

Parameters

int $value

at line203
int|null getHeightAttribute()

Get the height attribute.

Return Value

int|null

at line213
setSizeAttribute(int$value)

Set the size attribute.

Parameters

int $value

at line223
int|null getSizeAttribute()

Get the size attribute.

Return Value

int|null

at line233
setMimetypeAttribute(string$value)

Set the mimetype attribute.

Parameters

string $value

at line243
string|null getMimetypeAttribute()

Get the mimetype attribute.

Return Value

string|null

at line253
setTilingInProgressAttribute(bool$value)

Set the tilingInProgress attribute.

Parameters

bool $value

at line263
bool|null getTilingInProgressAttribute()

Get the tilingInProgress attribute.

Return Value

bool|null