Video
class Video extendsModel implementsFile
Traits
Properties
protectedarray | $fillable | The attributes that are mass assignable. | |
protectedarray | $casts | The attributes that should be casted to native types. | |
protectedarray | $appends | The accessors to append to the model's array form. | |
$hidden | The attributes hidden from the model's JSON form. | ||
protectedarray | $dispatchesEvents | The event map for the model. |
Methods
Set a dynamic JSON attribute.
Get a dynamic JSON attribute.
Scope a query to all videos that are accessible by a user.
Get the file URL.
The user who created this video.
The project this video belongs to.
The annotations that belong to this video.
Get the name of the storage disk of this video.
Get the file path in the storage disk of this video.
Set the gis_link attribute of this volume.
Get the gis_link attribute of this volume.
Set the doi attribute of this volume.
Get the doi attribute of this volume.
Determine if this video comes from a remote source.
Thumbnail string of this video. Use with the thumbnail_url
helper function.
URL to the thumbnail of this video.
Thumbnails array of this video. Use with the thumbnail_url
helper function.
URLs to the thumbnails of this video.
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 line77
Builder
scopeAccessibleBy(Builder$query,User$user)
Scope a query to all videos that are accessible by a user.
at line95
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 line105
BelongsTo
creator()
The user who created this video.
at line115
BelongsTo
project()
The project this video belongs to.
at line125
HasMany
annotations()
The annotations that belong to this video.
at line135
string
getDiskAttribute()
Get the name of the storage disk of this video.
at line145
string
getPathAttribute()
Get the file path in the storage disk of this video.
at line155
setGisLinkAttribute(string$value)
Set the gis_link attribute of this volume.
at line165
string
getGisLinkAttribute()
Get the gis_link attribute of this volume.
at line175
setDoiAttribute(string$value)
Set the doi attribute of this volume.
at line189
string
getDoiAttribute()
Get the doi attribute of this volume.
at line199
bool
isRemote()
Determine if this video comes from a remote source.
at line209
string
getThumbnailAttribute()
Thumbnail string of this video. Use with the thumbnail_url
helper function.
at line221
string
getThumbnailUrlAttribute()
URL to the thumbnail of this video.
at line231
Collection
getThumbnailsAttribute()
Thumbnails array of this video. Use with the thumbnail_url
helper function.
at line244
Collection
getThumbnailsUrlAttribute()
URLs to the thumbnails of this video.