Image
class Image extends VolumeFile
This model stores information on an image file in the file system.
Traits
Constants
| MIMES |
Allowed image MIME types. |
Properties
| int | $id | from VolumeFile | |
| int | $volume_id | from VolumeFile | |
| string | $filename | from VolumeFile | |
| string | $uuid | from VolumeFile |
Methods
Get an estimated count of all rows from pg_class statistics.
Set a dynamic JSON attribute.
Get a dynamic JSON attribute.
Adds the url attribute to the model. The url is the absolute path
to the original file.
URL to the thumbnail of this image.
The labels, this image got attached by the users.
The annotations on this image.
Get the attributes that should be cast.
Get the original image as download response.
Set the tilingInProgress attribute.
Get the tilingInProgress attribute.
Details
in
HasEstimatedCount at line 17
static int
estimatedCount()
Get an estimated count of all rows from pg_class statistics.
This is much faster than a full table scan of a large table.
Falls back to an exact count if no statistics are available.
in
HasJsonAttributes at line 16
protected
setJsonAttr(string $key, mixed $value, string $attrs = 'attrs')
Set a dynamic JSON attribute.
in
HasJsonAttributes at line 38
protected mixed
getJsonAttr(string $key, mixed $default = null, string $attrs = 'attrs')
Get a dynamic JSON attribute.
in
VolumeFile at line 29
string
getUrlAttribute()
Adds the url attribute to the model. The url is the absolute path
to the original file.
in
VolumeFile at line 37
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]://".
in
VolumeFile at line 47
VolumeFile>
volume()
The volume this video belongs to.
in
VolumeFile at line 55
setMetadataAttribute(array|null $value)
Set the metadata attribute.
in
VolumeFile at line 63
array|null
getMetadataAttribute()
Get the metadata attribute.
in
VolumeFile at line 73
setWidthAttribute(int $value)
Set the width attribute.
in
VolumeFile at line 83
int|null
getWidthAttribute()
Get the width attribute.
in
VolumeFile at line 93
setHeightAttribute(int $value)
Set the height attribute.
in
VolumeFile at line 103
int|null
getHeightAttribute()
Get the height attribute.
in
VolumeFile at line 113
setSizeAttribute(int $value)
Set the size attribute.
in
VolumeFile at line 123
int|null
getSizeAttribute()
Get the size attribute.
in
VolumeFile at line 133
string
getMimeTypeAttribute()
Get the mimeType attribute.
in
VolumeFile at line 143
setMimeTypeAttribute(string $value)
Set the mimeType attribute.
at line 150
string
getThumbnailUrlAttribute()
URL to the thumbnail of this image.
at line 66
VolumeFileLabel, $this>
labels()
The labels, this image got attached by the users.
at line 56
Annotation, $this>
annotations()
The annotations on this image.
at line 40
protected array
casts()
Get the attributes that should be cast.
at line 76
array<string, mixed>|RedirectResponse|StreamedResponse
getFile()
Get the original image as download response.
at line 130
setTilingInProgressAttribute(bool $value)
Set the tilingInProgress attribute.
at line 140
bool|null
getTilingInProgressAttribute()
Get the tilingInProgress attribute.