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.
protectedarray $hidden The attributes hidden from the model's JSON form.
protectedarray $dispatchesEvents The event map for the model.

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.

Builder
scopeAccessibleBy(Builder$query,User$user)

Scope a query to all videos that are accessible by a user.

string
getUrl()

Get the file URL.

BelongsTo
creator()

The user who created this video.

BelongsTo
project()

The project this video belongs to.

HasMany
annotations()

The annotations that belong to this video.

string
getDiskAttribute()

Get the name of the storage disk of this video.

string
getPathAttribute()

Get the file path in the storage disk of this video.

setGisLinkAttribute(string$value)

Set the gis_link attribute of this volume.

string
getGisLinkAttribute()

Get the gis_link attribute of this volume.

setDoiAttribute(string$value)

Set the doi attribute of this volume.

string
getDoiAttribute()

Get the doi attribute of this volume.

bool
isRemote()

Determine if this video comes from a remote source.

string
getThumbnailAttribute()

Thumbnail string of this video. Use with the thumbnail_url helper function.

string
getThumbnailUrlAttribute()

URL to the thumbnail of this video.

Collection
getThumbnailsAttribute()

Thumbnails array of this video. Use with the thumbnail_url helper function.

Collection
getThumbnailsUrlAttribute()

URLs to the thumbnails of this video.

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 line77
Builder scopeAccessibleBy(Builder$query,User$user)

Scope a query to all videos that are accessible by a user.

Parameters

Builder $query
User $user

Return Value

Builder

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]://".

Return Value

string

at line105
BelongsTo creator()

The user who created this video.

Return Value

BelongsTo

at line115
BelongsTo project()

The project this video belongs to.

Return Value

BelongsTo

at line125
HasMany annotations()

The annotations that belong to this video.

Return Value

HasMany

at line135
string getDiskAttribute()

Get the name of the storage disk of this video.

Return Value

string

at line145
string getPathAttribute()

Get the file path in the storage disk of this video.

Return Value

string

at line155
setGisLinkAttribute(string$value)

Set the gis_link attribute of this volume.

Parameters

string $value

at line165
string getGisLinkAttribute()

Get the gis_link attribute of this volume.

Return Value

string

at line175
setDoiAttribute(string$value)

Set the doi attribute of this volume.

Parameters

string $value

at line189
string getDoiAttribute()

Get the doi attribute of this volume.

Return Value

string

at line199
bool isRemote()

Determine if this video comes from a remote source.

Return Value

bool

at line209
string getThumbnailAttribute()

Thumbnail string of this video. Use with the thumbnail_url helper function.

Return Value

string

at line221
string getThumbnailUrlAttribute()

URL to the thumbnail of this video.

Return Value

string

at line231
Collection getThumbnailsAttribute()

Thumbnails array of this video. Use with the thumbnail_url helper function.

Return Value

Collection

at line244
Collection getThumbnailsUrlAttribute()

URLs to the thumbnails of this video.

Return Value

Collection