'int', 'height' => 'int', 'payload' => 'object', 'render_settings' => 'object', ]; protected $fillable = [ 'external_id', 'content_type', 'width', 'height', 'aspect_ratio', 'payload', 'render_settings', ]; protected $hidden = [ 'id', ]; public function video_renders() { return $this->hasMany(VideoRender::class)->orderBy('id', 'DESC'); } public function video_captions() { return $this->hasMany(VideoCaption::class)->orderBy('time', 'ASC'); } public function video_elements() { return $this->hasMany(VideoElement::class)->orderBy('time', 'ASC'); } public function latest_render() { return $this->hasOne(VideoRender::class)->latest(); } /** * The "booted" method of the model. */ protected static function booted(): void { static::creating(function ($model) { $model->uuid = $model->uuid ?? (string) Str::uuid(); }); } }