Image
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. | |
$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
Set a dynamic JSON attribute.
Get a dynamic JSON attribute.
Get the file URL.
The volume, this image belongs to.
The annotations on this image.
The labels, this image got attached by the users.
Adds the url
attribute to the image model. The url is the absolute path
to the original image file.
Set the image metadata attribute.
Get the image metadata attribute.
Get the original image as download response.
Set the width attribute.
Get the width attribute.
Set the height attribute.
Get the height attribute.
Set the size attribute.
Get the size attribute.
Set the mimetype attribute.
Get the mimetype attribute.
Set the tilingInProgress attribute.
Get the tilingInProgress attribute.
Details
inHasJsonAttributesat line16
protected
setJsonAttr(string$key,mixed$value,string$attrs ='attrs')
Set a dynamic JSON attribute.
inHasJsonAttributesat line38
protectedmixed
getJsonAttr(string$key,mixed$default =null,string$attrs ='attrs')
Get a dynamic JSON attribute.
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]://".
at line70
BelongsTo
volume()
The volume, this image belongs to.
at line80
BelongsTo
annotations()
The annotations on this image.
at line90
HasMany
labels()
The labels, this image got attached by the users.
at line101
string
getUrlAttribute()
Adds the url
attribute to the image model. The url is the absolute path
to the original image file.
at line111
setMetadataAttribute(array$value)
Set the image metadata attribute.
at line121
array
getMetadataAttribute()
Get the image metadata attribute.
at line131
Response
getFile()
Get the original image as download response.
at line173
setWidthAttribute(int$value)
Set the width attribute.
at line183
int|null
getWidthAttribute()
Get the width attribute.
at line193
setHeightAttribute(int$value)
Set the height attribute.
at line203
int|null
getHeightAttribute()
Get the height attribute.
at line213
setSizeAttribute(int$value)
Set the size attribute.
at line223
int|null
getSizeAttribute()
Get the size attribute.
at line233
setMimetypeAttribute(string$value)
Set the mimetype attribute.
at line243
string|null
getMimetypeAttribute()
Get the mimetype attribute.
at line253
setTilingInProgressAttribute(bool$value)
Set the tilingInProgress attribute.
at line263
bool|null
getTilingInProgressAttribute()
Get the tilingInProgress attribute.