class Image extends VolumeFile

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

Traits

HasFactory

Constants

MIMES

Allowed image MIME types.

Properties

bool $timestamps

Don't maintain timestamps for this model.

from  VolumeFile
int $id from  VolumeFile
int $volume_id from  VolumeFile
string $filename from  VolumeFile
protected array<int,string> $fillable

The attributes that are mass assignable.

protected array<int,string> $hidden

The attributes hidden in the model's JSON form.

protected array<string,string> $casts

The attributes that should be casted to native types.

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
getUrlAttribute()

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

string
getUrl()

Get the file URL.

volume()

The volume this video belongs to.

setMetadataAttribute(array|null $value)

Set the metadata attribute.

array|null
getMetadataAttribute()

Get the metadata attribute.

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.

string
getMimeTypeAttribute()

Get the mimeType attribute.

setMimeTypeAttribute(string $value)

Set the mimeType attribute.

string
getThumbnailUrlAttribute()

URL to the thumbnail of this image.

labels()

The labels, this image got attached by the users.

annotations()

The annotations on this image.

array<string,mixed>|RedirectResponse|StreamedResponse
getFile()

Get the original image as download response.

setTilingInProgressAttribute(bool $value)

Set the tilingInProgress attribute.

bool|null
getTilingInProgressAttribute()

Get the tilingInProgress attribute.

Details

in HasJsonAttributes at line 16
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.

in HasJsonAttributes at line 38
protected mixed 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

in VolumeFile at line 32
string getUrlAttribute()

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

Return Value

string

in VolumeFile at line 40
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

in VolumeFile at line 50
volume()

The volume this video belongs to.

in VolumeFile at line 58
setMetadataAttribute(array|null $value)

Set the metadata attribute.

Parameters

array|null $value

in VolumeFile at line 66
array|null getMetadataAttribute()

Get the metadata attribute.

Return Value

array|null

in VolumeFile at line 76
setWidthAttribute(int $value)

Set the width attribute.

Parameters

int $value

in VolumeFile at line 86
int|null getWidthAttribute()

Get the width attribute.

Return Value

int|null

in VolumeFile at line 96
setHeightAttribute(int $value)

Set the height attribute.

Parameters

int $value

in VolumeFile at line 106
int|null getHeightAttribute()

Get the height attribute.

Return Value

int|null

in VolumeFile at line 116
setSizeAttribute(int $value)

Set the size attribute.

Parameters

int $value

in VolumeFile at line 126
int|null getSizeAttribute()

Get the size attribute.

Return Value

int|null

in VolumeFile at line 136
string getMimeTypeAttribute()

Get the mimeType attribute.

Return Value

string

in VolumeFile at line 146
setMimeTypeAttribute(string $value)

Set the mimeType attribute.

Parameters

string $value

at line 165
string getThumbnailUrlAttribute()

URL to the thumbnail of this image.

Return Value

string

at line 81
labels()

The labels, this image got attached by the users.

at line 71
annotations()

The annotations on this image.

at line 91
array<string,mixed>|RedirectResponse|StreamedResponse getFile()

Get the original image as download response.

Return Value

array<string,mixed>|RedirectResponse|StreamedResponse

at line 145
setTilingInProgressAttribute(bool $value)

Set the tilingInProgress attribute.

Parameters

bool $value

at line 155
bool|null getTilingInProgressAttribute()

Get the tilingInProgress attribute.

Return Value

bool|null